Adding certain things to script spawned items...
Moderator: Moderators
-
Master-Of-Fungus-Foo-D
- Muffin Man
- Posts: 1544
- Joined: Tue Jan 27, 2004 12:33 am
- Location: cali, United States
Adding certain things to script spawned items...
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 
You can spawn a splinepath by doing this
or
For the mdl value you can just do this:
Code: Select all
spawn script_object "targetname" "myplane" "classname" "info_splinepath"
Code: Select all
spawn info_splinepath "targetname" "myplane"
Code: Select all
$myplane.mdl = "vehicles/stuka_fly.tik"
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"
if (level.bomberpath[local.i].mdl != NIL)
local.model = level.bomberpath[local.i].mdl
else
local.model = "vehicles/p47fly.tik"
-
Master-Of-Fungus-Foo-D
- Muffin Man
- Posts: 1544
- Joined: Tue Jan 27, 2004 12:33 am
- Location: cali, United States

