ahhh, script problem. Please Help. -1 reply

Please wait...

Slusk

Scripter, Mapper

50 XP

7th July 2005

0 Uploads

389 Posts

0 Threads

#1 12 years ago

ok I made a script that runs fine, Except I can't get the npc to face the right direction here is my script

set ( /*@SET_TYPES*/ "SET_WEAPON", /*@WEAPON_NAMES*/ "WP_NONE" ); set ( /*!*/ "SET_BEHAVIOR_STATE", /*!*/ "BS_DEFAULT" ); set ( /*@SET_TYPES*/ "SET_RUNNING", /*@BOOL_TYPES*/ "true" ); set ( /*!*/ "SET_LOOK_FOR_ENEMIES", /*!*/ "false" ); set ( /*!*/ "SET_CHASE_ENEMIES", /*!*/ "false" ); task ( "nav_patrol1" ) { set ( /*@SET_TYPES*/ "SET_NAVGOAL", "death1" ); } dowait ( "nav_patrol1" ); wait ( 2000.000 ); set ( /*@SET_TYPES*/ "SET_LOOK_TARGET", "gangster" ); wait ( 1000.000 ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "TORSO_SURRENDER_START" ); set ( /*@SET_TYPES*/ "SET_ANIM_HOLDTIME_BOTH", 5000 ); wait ( 3000.000 ); set ( /*!*/ "SET_LOOK_FOR_ENEMIES", /*!*/ "true" ); set ( /*!*/ "SET_CHASE_ENEMIES", /*!*/ "true" );

I set the set ( /*@SET_TYPES*/ "SET_LOOK_TARGET", "gangster" ); but he just turns away any help here? the targetname of the npc on the map is gangster and he is spawned but he won't look at him. is there a way to face orgin or is the script wrong




Admiral Krause

No current projects...

50 XP

15th June 2004

0 Uploads

155 Posts

0 Threads

#2 12 years ago

You need to use the command SET_DYAW and then specify which direction he needs to face. Or you could use the directional commands in the enity window in Radiant.




Slusk

Scripter, Mapper

50 XP

7th July 2005

0 Uploads

389 Posts

0 Threads

#3 12 years ago

I know that and I was using the commands in radiant, but when i set the behavior to bs default he looked away, but anyways I got it going. thanks anyways.