PDA

View Full Version : Script help


Blaster
06-29-2002, 08:43 PM
I wish to do a script which allows an NPC to run to a waypoint and then stop. Does anyone know how this can be done.

ra_rasmus
06-29-2002, 09:15 PM
Read the ICARUS Manual.doc that follows with the second version of the JK2Editing SDK. You should be able to find it out there!!

Blaster
06-29-2002, 09:22 PM
I've looked through that it talks about an NPC going through 3 waypoints but when I tried this my NPC just ran on the spot and didn't move.

ra_rasmus
06-29-2002, 09:33 PM
I also had that problem but I just went through the ICARUS completely and mixed my script with the ones from SP_scripts.zip!

Xcom
06-30-2002, 05:41 AM
NPC runs to NAVGOAL and stops:


//Generated by BehavEd

rem ( "comment" );

affect ( "NPC_Targetname", /*@AFFECT_TYPE*/ FLUSH )
{
set ( /*@SET_TYPES*/ "SET_RUNNING", /*@BOOL_TYPES*/ "true" );

task ( "go1" )
{
set ( /*@SET_TYPES*/ "SET_NAVGOAL", "NAVGOAL_targetname" );
}

dowait ( "go1" );
set ( /*@SET_TYPES*/ "SET_RUNNING", /*@BOOL_TYPES*/ "false" );
}


This should be triggered by target_scriptrunner because it "affects" an NPC. If you wanna make it a spawnscript, you should remove "AFFECT" line.