kingtitan Posted June 23, 2013 Share Posted June 23, 2013 Hello all, it's been quite awhile since I've posted anything on here! Anyway, I have a bit of a problem that I hope I can explain in enough detail to make sense. I am trying to call a specific idle on an NPC when they reach a trigger zone. Of course, I have viewed this page: http://cs.elderscrolls.com/index.php/Forcing_Idle_Animations which has provided some help. However, as the page is outdated, the pivotal picture that contains conditions is missing with no other way to find out how to accomplish my task. So my first question is, what conditions need to be present to call the idle pose when an NPC reaches the trigger zone? I'm not worried about the script (yet), but without the conditions i have no idea how to call the pose. Any help is much appreciated! Link to comment Share on other sites More sharing options...
DrakeTheDragon Posted June 23, 2013 Share Posted June 23, 2013 (edited) Well, usually the 'condition' is whatever you 'set up' yourself.Your trigger zone 'sets' it and your idle animation 'checks' for it.Something else 'resets' it as well, of course, but that depends on how you set it up. Some examples are:adding a token into the NPC's inventory when he enters the zone and removing it when he leaves it,having the actor affected by a spell cast on it while inside the trigger zone (effects and visuals unneccessary/undesired),scripts and variables can be set and checked as well, but this'll get a little tricky for an indefinite number of actors which aren't necessarily all running said script.I don't know if you can also set up a condition like "is inside trigger zone A" directly, but I won't deny this possibility either. After all, there must be something the trigger zone 'triggers', or there won't be such kind of activator existing. Edited June 23, 2013 by DrakeTheDragon Link to comment Share on other sites More sharing options...
kingtitan Posted June 23, 2013 Author Share Posted June 23, 2013 I think the easiest way to do this would be to add a line to the trigger zone's script that would add a token (I already have a token set up). However how would I add within the script for the token to be added upon triggering the zone? I.E., is it possible to set up the code so that any NPC who enters the trigger zone will have the token added to their inventory? Right now I have it set up so that the actor will only travel to the trigger zone location on command from a scripted spell. What I thought about doing was adding the token to the NPC's inventory when the spell is cast on them. However, the problem with this method is that without the proper conditions, the token's idle is immediately played (the only condition I have at the moment is getitemcount == 1). I tried using Getdistance, but I always seem to have trouble when I attempt to use it in a condition. And if it helps at all this is the code I have so far for the trigger zone: scn ATTrigZoneScript2 short triggered begin onTriggerActor if triggered == 0 pickidle set triggered to 1 endif end begin onTriggerActor player end begin onReset set triggered to 0 end Link to comment Share on other sites More sharing options...
Recommended Posts