Forums Gallery LOGIN |REGISTER

Looking at object makes the player say something?

Please use this forum for questions on C++, Lua, XML, and any other languages used in CryENGINE development.


 

User avatar C-zom
Regular Dev
Regular Dev
 
Posts: 532
Member since: 23.05.2008, 23:34
Location: New Jersey
Likes: 18

Looking at object makes the player say something?

Postby C-zom » 08.03.2012, 06:25

You guys ever play the Penumbra series, or Call of Cthulhu? Being at a certain distance away from any object you were directly looking at, and pressing the action key, would render a voice over to play describing it. This is a staple of adventure games in the old days.

Is there any way to emulate this in coding, or flowgraph, in Cryengine3?
User avatar da3dsoul
Senior Developer
Senior Developer
 
Posts: 875
Member since: 16.06.2010, 11:41
Location: West Lafayette, Indiana
Likes: 2

Re: Looking at object makes the player say something?

Postby da3dsoul » 08.03.2012, 08:30

yes probably via soundspot and flowgraph
BEWARE: Flaming aliens are generally more grumpy than normal ones.
User avatar Talvipakkanen
Executive Producer
Executive Producer
 
Posts: 4307
Member since: 16.06.2008, 22:11
Location: Oulu, Finland
Likes: 8

Re: Looking at object makes the player say something?

Postby Talvipakkanen » 08.03.2012, 08:30

Can be done with flowgraph using "RayCastCamera"-node to detect entities, or making all applicable entities usable.

raycast_entity_info.jpg
Zip-line release 2012-04-24 (for CE2 & CE3) · C1 mod project: A mod called Entry
Assets · Blender: Destroyable object tutorial for CryBlend

- currently lost in New Eden -
User avatar da3dsoul
Senior Developer
Senior Developer
 
Posts: 875
Member since: 16.06.2010, 11:41
Location: West Lafayette, Indiana
Likes: 2

Re: Looking at object makes the player say something?

Postby da3dsoul » 17.03.2012, 02:05

that only displays a text message, plus the debug gun does that, assuming you can use fmod (I can't don't ask me), you could probably play a sound using it
BEWARE: Flaming aliens are generally more grumpy than normal ones.
User avatar Talvipakkanen
Executive Producer
Executive Producer
 
Posts: 4307
Member since: 16.06.2008, 22:11
Location: Oulu, Finland
Likes: 8

Re: Looking at object makes the player say something?

Postby Talvipakkanen » 17.03.2012, 09:31

Yea, fg above shows a sample about how to retrieve entity infromation, and debug-node is used for displaying it. Of course node needs to be replaced with some other node for creating sound or speech.
Zip-line release 2012-04-24 (for CE2 & CE3) · C1 mod project: A mod called Entry
Assets · Blender: Destroyable object tutorial for CryBlend

- currently lost in New Eden -
User avatar da3dsoul
Senior Developer
Senior Developer
 
Posts: 875
Member since: 16.06.2010, 11:41
Location: West Lafayette, Indiana
Likes: 2

Re: Looking at object makes the player say something?

Postby da3dsoul » 17.03.2012, 09:39

yep
BEWARE: Flaming aliens are generally more grumpy than normal ones.