Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsJedi Outcast and Jedi Academy Editing Forum → Hey a bit o scripting help?
Hey a bit o scripting help?
2005-01-28, 1:35 AM #1
Darth Linux is thinking about having me join up the DF Mod Team and is requiring me to make a map with some interesting things. I should learn how to script these on my own which is going over ok. Now on to NPC waypointing here look at this script and someone please tell me how to get my imperial officer to do this!

//Generated by BehavEd

rem ( "I took this from JK2 kejim post the gaurd that you first kill I think Ive set my nav goal for him to run from his barricade to a safe spot behind a wall through an open door." );

affect ( "imp_booth1", /*@AFFECT_TYPE*/ FLUSH )
{

task ( "patrol1" )
{
set ( /*@SET_TYPES*/ "SET_NAVGOAL", "run0_0" );
}


task ( "patrol2" )
{
set ( /*@SET_TYPES*/ "SET_NAVGOAL", "run0_1" );
}


loop ( -1 )
{
dowait ( "patrol1" );
wait ( 1000.000 );
dowait ( "patrol2" );
wait ( 1000.000 );
}

}




When I solve this ill move on to my second question
2005-01-28, 1:45 AM #2
Uh... Am I missing something, because I don't see the question :confused:. I can only assume it doesn't work because you posted it here. The script looks somewhat fine to me, so you will need to describe what is happening, or more precisely, what is not happening in game, when you try to run the script.

Though I must say I don't quite understand how the description in the rem matches with the script, but that's trivial, of course. :)
Frozen in the past by ICARUS
2005-01-28, 11:58 AM #3
Ok I have this script I made the IBI file, and then I don't know what the heckle to do with it. I've tried script_runners, setting different keys and values in the entity window for my npc_spawner and navgoals please gimmie some help taking my okay script I ripped off of Kejim into making an officer run to the navgoals:p :eek:
2005-01-28, 12:23 PM #4
Use a 'spawnscript' key on the officer's entity.
2005-01-28, 12:55 PM #5
Yes. Though if you use it as spawnscript, you don't need to include the affect command in the script, as a spawnscript automatically affects the host entity.
Frozen in the past by ICARUS
2005-01-28, 1:44 PM #6
Spawnscript wont work
The stupidimp is being dumb
2005-01-28, 3:59 PM #7
Well... Here's my own old (working) spawnscript for a couple of ST boneheads, from my good old Lighthouse.

Code:
rem ( "gate dummys spawn" );
set ( /*@SET_TYPES*/ "SET_WALKING", /*@BOOL_TYPES*/ "true" );
set ( /*@SET_TYPES*/ "SET_ANGERSCRIPT", "lighthouse/guardangry" );

task ( "to parm_nav1" )
{
	set ( /*@SET_TYPES*/ "SET_NAVGOAL", $get( STRING, "SET_PARM1")$ );
}


task ( "to parm_nav2" )
{
	set ( /*@SET_TYPES*/ "SET_NAVGOAL", $get( STRING, "SET_PARM2")$ );
}


loop ( -1 )
{
	dowait ( "to parm_nav1" );
	wait ( 2000.000 );
	dowait ( "to parm_nav2" );
}


Don't tell me a spawnscript doesn't work, because I have used the method countless times.

Check you use ordinary targetnames for your navgoals, not script_targetnames...
Frozen in the past by ICARUS
2005-01-28, 6:53 PM #8
OK I think I got the scripts of mine to work but when I use them the game crashes!
without any error at all.:(
2005-01-29, 2:48 AM #9
Have you given the same NPC_targetname to multiple NPCs? That is one way to crash the game without any error messages. I haven't personally experienced any other ways, though that means nothing. I have always tried to follow good scripting and entity use conventions, which probably has saved me some trouble.
Frozen in the past by ICARUS
2005-01-29, 7:16 AM #10
Allright, make a ST bonehead (cool name Lassev :D), give them the key: spawnscript...and the value: Scriptname1

Then, your scriptname1 script, should look like this:
Code:
//Generated by BehavEd

rem ( "comment" );
set ( /*@SET_TYPES*/ "SET_ANGERSCRIPT", "scriptname2" );
set ( /*@SET_TYPES*/ "SET_PAINSCRIPT", "scriptname2" );
set ( /*@SET_TYPES*/ "SET_ENEMY", "NULL" );
set ( /*@SET_TYPES*/ "SET_IGNOREENEMIES", /*@BOOL_TYPES*/ "true" );
set ( /*@SET_TYPES*/ "SET_DONTFIRE", /*@BOOL_TYPES*/ "true" );
//$"walkOnly"@5
set ( /*!*/ "SET_BEHAVIOR_STATE", /*!*/ "BS_DEFAULT" );
set ( /*!*/ "SET_WALKING", /*!*/ "true" );
set ( /*!*/ "SET_RUNNING", /*!*/ "false" );
set ( /*!*/ "SET_IGNOREALERTS", /*!*/ "true" );
set ( /*!*/ "SET_LOOK_FOR_ENEMIES", /*!*/ "false" );

task ( "waypoint1task" )
{
	set ( /*@SET_TYPES*/ "SET_NAVGOAL", "waypoint1" );
}


task ( "waypoint2task" )
{
	set ( /*@SET_TYPES*/ "SET_NAVGOAL", "waypoint2" );
}


loop ( -1 )
{
	dowait ( "waypoint1task" );
	wait ( 2000.000 );
	dowait ( "waypoint2task" );
	wait ( 2000.000 );
}


Then the scriptname2 script would set the beheaviour to default...change the agression and vision also, the lines:
Code:
( /*@SET_TYPES*/ "SET_IGNOREENEMIES", /*@BOOL_TYPES*/ "true" );
set ( /*@SET_TYPES*/ "SET_DONTFIRE", /*@BOOL_TYPES*/ "true" );


Need to be changed...yes, i am always extra carefull whens it comes to scripting

↑ Up to the top!