Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Joined: Aug 2014
M
Mag Offline OP
journeyman
OP Offline
journeyman
M
Joined: Aug 2014
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.

Joined: Oct 2005
T
journeyman
Offline
journeyman
T
Joined: Oct 2005
Try this:


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.
Joined: Aug 2014
M
Mag Offline OP
journeyman
OP Offline
journeyman
M
Joined: Aug 2014
Originally Posted by Thoro
Try this:


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.
Joined: Apr 2013
N
addict
Offline
addict
N
Joined: Apr 2013
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", "");

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

Joined: Oct 2005
T
journeyman
Offline
journeyman
T
Joined: Oct 2005
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.

Joined: Aug 2014
M
Mag Offline OP
journeyman
OP Offline
journeyman
M
Joined: Aug 2014
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!

Joined: Dec 2013
stranger
Offline
stranger
Joined: Dec 2013
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

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5