Divinity Banner
Previous Thread
Next Thread
Print Thread
Using gestures outside of dialogue #552213
10/09/14 11:53 AM
10/09/14 11:53 AM
Joined: Aug 2014
Posts: 54
M
Mag Offline OP
journeyman
Mag  Offline OP
journeyman
M

Joined: Aug 2014
Posts: 54
Is it possible to trigger a gesture outside of dialogue? For instance have a character say something using character display text and then point at someone.

I looked through the story commands but didn't see anything.

Re: Using gestures outside of dialogue [Re: Mag] #552512
10/09/14 07:35 PM
10/09/14 07:35 PM
Joined: Oct 2005
Posts: 67
T
Thoro Offline
journeyman
Thoro  Offline
journeyman
T

Joined: Oct 2005
Posts: 67
Try this:

Click to reveal..

Code:
EVENT
ON
	OnSomething()
ACTIONS
	SetPriority(Point, 10000)

Code:
REACTION Point, 0
USAGE PEACE
ACTIONS
	CharacterLookAt(YourTarget)
	CharacterPlayAnimation("use_activate")
	SetPriority(Point, 0)


Last edited by Thoro; 10/09/14 07:35 PM.
Re: Using gestures outside of dialogue [Re: Thoro] #552527
11/09/14 02:01 AM
11/09/14 02:01 AM
Joined: Aug 2014
Posts: 54
M
Mag Offline OP
journeyman
Mag  Offline OP
journeyman
M

Joined: Aug 2014
Posts: 54
Originally Posted By: Thoro
Try this:

Click to reveal..

Code:
EVENT
ON
	OnSomething()
ACTIONS
	SetPriority(Point, 10000)

Code:
REACTION Point, 0
USAGE PEACE
ACTIONS
	CharacterLookAt(YourTarget)
	CharacterPlayAnimation("use_activate")
	SetPriority(Point, 0)



Sorry, but this mostly went over my head. I tried it as-is and it wouldn't compile. I tried including these bits after a trigger based IF statement:


CharacterLookAt(_Player)
CharacterPlayAnimation("use_activate")
SetPriority(Point, 0)

The NPC did turn to look at my character but the rest didn't seem to execute. Where did you get "use_activate"? I tried a couple of different scripts from Resource Manager but they didn't fire either.

Thanks for helping me get him to look. That's a start.

**Edit: I wasn't paying attention to the syntax clues in the story editor. CharacterPlayerAnimation worked once I had it formed properly.

Thanks


Last edited by Mag; 11/09/14 02:22 AM.
Re: Using gestures outside of dialogue [Re: Mag] #552528
11/09/14 02:22 AM
11/09/14 02:22 AM
Joined: Apr 2013
Posts: 465
N
Norbyte Offline
addict
Norbyte  Offline
addict
N

Joined: Apr 2013
Posts: 465
That should be put into the characters behavior script (Public\%modName%\Scripts\%name%.charScript) and not into the story scripts.

If you're looking for a way to do this in story scripts:
Code:
CharacterLookAtCharacter(_Character, _TargetCharacter, 0);
// or CharacterLookAtItem(_Character, _TargetItem, 0);
CharacterPlayAnimation(_Character, "use_activate", "");

Re: Using gestures outside of dialogue [Re: Mag] #552753
11/09/14 07:36 AM
11/09/14 07:36 AM
Joined: Oct 2005
Posts: 67
T
Thoro Offline
journeyman
Thoro  Offline
journeyman
T

Joined: Oct 2005
Posts: 67
If you want other animations have a look at Public\Main\ActionTemplates\playerActionTemplates.lsb. wink

Re: Using gestures outside of dialogue [Re: Mag] #553172
11/09/14 02:54 PM
11/09/14 02:54 PM
Joined: Oct 2005
Posts: 67
T
Thoro Offline
journeyman
Thoro  Offline
journeyman
T

Joined: Oct 2005
Posts: 67
Or better yet: In the game editor, place the character you want to animate, select it and in the sidebar hit VisualSet. In the upcoming panel you can play any animation for that character and get the name.

Re: Using gestures outside of dialogue [Re: Thoro] #553361
12/09/14 01:11 AM
12/09/14 01:11 AM
Joined: Aug 2014
Posts: 54
M
Mag Offline OP
journeyman
Mag  Offline OP
journeyman
M

Joined: Aug 2014
Posts: 54
Originally Posted By: Thoro
Or better yet: In the game editor, place the character you want to animate, select it and in the sidebar hit VisualSet. In the upcoming panel you can play any animation for that character and get the name.


Thanks!

Re: Using gestures outside of dialogue [Re: Mag] #553727
12/09/14 01:46 PM
12/09/14 01:46 PM
Joined: Dec 2013
Posts: 22
Sunjammer Offline

stranger
Sunjammer  Offline

stranger

Joined: Dec 2013
Posts: 22
As Norbyte indicated CharacterPlayAnimation exists as both a command (object scripting) and a call (story scripting). In the wiki I've created disambiguation pages for any command that exists in more than one of the scripting languages.


Sunjammer
Code Monkey
Divinity Engine Wiki

Powered by UBB.threads™ PHP Forum Software 7.6.2