I have read so many tutorials, and none of them seem to be up to date enough to work.
i've tried NW_CHAIR with a nw_c2_sitting heartbeat and it wont work
ive tried this: http://nwn2.forumup....ut281-nwn2.html
which mostly works but only if the bench is an environmental object and therefore the PCs can walk through it
and I cant find a tutorial that explains what objects can or cant be sat on by what creatures using ActionSit, or how to actually work it.
Help?
thanks
Getting NPC's to sit (on a bench)
Débuté par
AeitZean
, janv. 22 2011 04:09
#1
Posté 22 janvier 2011 - 04:09
#2
Posté 22 janvier 2011 - 04:42
ActionSit, and NW_CHAIR, are vestigial bits from NWN1 that no longer work in NWN2. In NWN2, you have to use PlayCustomAnimation to command the NPC to play the sitting animation. The method I use is to lay down a waypoint with a unique tag right where you want the NPC to sit. On the NPC's heartbeat script, you write something like:
location lLoc = GetLocation(GetObjectByTag(sWPTag));
JumpToLocation(lLoc);
PlayCustomAnimation(OBJECT_SELF, "sitidle", TRUE);
The chair itself doesn't matter, they can be sitting in mid-air as far as the scripting is concerned. The only issue is that you need to make sure the waypoint is in a walkable area. For a bench, you could turn the bench into an environmental object, and then lay down a walkmesh cutter along the back of the bench, to keep NPCs from walking through it, while keeping the front edge free for NPCs to approach and sit.
location lLoc = GetLocation(GetObjectByTag(sWPTag));
JumpToLocation(lLoc);
PlayCustomAnimation(OBJECT_SELF, "sitidle", TRUE);
The chair itself doesn't matter, they can be sitting in mid-air as far as the scripting is concerned. The only issue is that you need to make sure the waypoint is in a walkable area. For a bench, you could turn the bench into an environmental object, and then lay down a walkmesh cutter along the back of the bench, to keep NPCs from walking through it, while keeping the front edge free for NPCs to approach and sit.
#3
Posté 22 janvier 2011 - 04:58
@Lugaid of the Red Stripes
there are no words to explain how grateful I am.
Thank You.
there are no words to explain how grateful I am.
Thank You.





Retour en haut






