IrocJeff Posted January 2, 2015 Posted January 2, 2015 Running into a problem. I have a prisoner typing at a console but unfortunately there are stormtroopers around it. What happens is that the troopers will turn on the prisoner. They aren't supposed to. Is there any way I can get the stormtroopers to ignore the prisoner with scripting?
Kessno Posted January 2, 2015 Posted January 2, 2015 It's been a long time since I've done any scripting, but isn't it possible to flag the prisoner NPC as an 'enemy'? That way he'll appear friendly to the stormtrooper NPCs and then you can set 'notarget' on the prisoner as well so he will ignore you and not attack.
Asgarath83 Posted January 2, 2015 Posted January 2, 2015 you can change the "team" of prisoner to "Team Enemy" when stormtrooper approach to him.
mrwonko Posted January 2, 2015 Posted January 2, 2015 and then you can set 'notarget' on the prisoner as well so he will ignore you and not attack.Isn't notarget about you being ignored? So just make the prisoner notarget?
Ramikad Posted January 2, 2015 Posted January 2, 2015 SET_NOTARGET will do just fine. It works on everything, NPC and Player.
IrocJeff Posted January 2, 2015 Author Posted January 2, 2015 SET_NOTARGET will do just fine. It works on everything, NPC and Player. affect ( "type1", /*@AFFECT_TYPE*/ FLUSH ) { task ( "type" ) { set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_CONSOLE1" ); set ( /*@SET_TYPES*/ "SET_ANIM_HOLDTIME_BOTH", -1 ); } dowait ( "type" ); } When I use the above script as it is my prisoner will type away forever. Once I put in the SET_NOTARGET in it I run into the problem. The prisoner types for a bit and then goes to an attack stance or whatever the default stance is for the npc. Where in this script is the correct place to put SET_NOTARGET?
Solution Ramikad Posted January 2, 2015 Solution Posted January 2, 2015 Not completely sure, but I resolved this making the prisoner ignore enemies (SET_IGNOREENEMIES TRUE). I put both strings after SET_ANIM_HOLDTIME_BOTH -1.
IrocJeff Posted January 2, 2015 Author Posted January 2, 2015 Not completely sure, but I resolved this making the prisoner ignore enemies (SET_IGNOREENEMIES TRUE). I put both strings after SET_ANIM_HOLDTIME_BOTH -1. Thanks for the help. It works great with the SET_NOTARGET & SET_IGNOREENEMIES put in the right spot. All the NPC does is type and ignore the world around it, which fits in well with my story... Thanks again.
Bystrzy Posted January 17, 2015 Posted January 17, 2015 I have a similar question so i don't want to start a new topic.Is there any way to force NPC to stop targeting at player if that NPC is agroed ,and make him return to his basic script ie. walking thru level and looking for enemies.To clarify, i mean, MGS style enemy behavior.
eezstreet Posted January 18, 2015 Posted January 18, 2015 I believe there is a field for this, similar to angerscript etc. See if one of those exists.
redsaurus Posted January 18, 2015 Posted January 18, 2015 something like this might work: set ( /*@SET_TYPES*/ "SET_ENEMY", "NULL" ); set ( /*@SET_TYPES*/ "SET_BEHAVIOR_STATE", /*@BSTATE_STRINGS*/ "BS_DEFAULT" ); set ( /*@SET_TYPES*/ "SET_LOOK_FOR_ENEMIES", "true" );
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now