Page 1 of 1

Adding certain things to script spawned items...

Posted: Sat Sep 25, 2004 12:40 pm
by Master-Of-Fungus-Foo-D
how would i add an $mdl value to a splinepath by script? my current goal is to get a plane to spawn in a map(a simple small outside map). how would i add a $targetname? help :idea:

Posted: Sat Sep 25, 2004 2:58 pm
by strafer
You can spawn a splinepath by doing this

Code: Select all

spawn script_object "targetname" "myplane" "classname" "info_splinepath"
or

Code: Select all


spawn info_splinepath "targetname" "myplane"

For the mdl value you can just do this:

Code: Select all

$myplane.mdl = "vehicles/stuka_fly.tik"

Posted: Sat Sep 25, 2004 3:03 pm
by bdbodger
If the info_splinepath node is already in the map and has no targetname you are out of luck but you can spawn an info_splinepath node and give it a targetname and a mdl value.You have to use mdl you can't use $mdl if you are spawning . The mdl value is used by certain scripts to let the script know what model you have choosen to spawn and then that script would spawn that model as a script_model and then make it follow the info_splinepath . In other words the mdl value is only there to tell the script what model to spawn . The script may also have a default model it will spawn if you don't use the mdl value at all . For example this is from the global/bomber.scr


if (level.bomberpath[local.i].mdl != NIL)
local.model = level.bomberpath[local.i].mdl
else
local.model = "vehicles/p47fly.tik"

Posted: Sat Sep 25, 2004 3:13 pm
by Master-Of-Fungus-Foo-D
cool. im going to try to spawn the stuff... thx...