Page 1 of 2
Cant spawn anything in Spearhead!
Posted: Sun May 02, 2004 6:25 pm
by meowmix11
Help me please! I use script files to usually spawn things in Allied Assault, but it wont work for me in Spearhead. Can someonetell me how to correctly spawn thingts in Spearhead and give me a spawn list? Im sorry but i am kinda new at this.
Thanks,
meowmix11
Posted: Sun May 02, 2004 7:16 pm
by lizardkid
there's a thing i usually use in SH from script that's slightly mrore advanced but faster, you don't use actors but you probably want a trigger with setthread. put this line in the thread you setthread...
spawn models/human/german_panzer_shutze.tik // after this you can add //stuff like origin and gun that you normally fnd in AI properties.
so, if you wanted to spawn a shutze as such at 10 10 10 (x y z axis) with a mp40, youd place this total.....
spawn models/human/german_panzer_obershutze.tik "gun" "mp40" "origin" "10 10 10"
sorry if that exceeded lines....
if you need more clarity let me know...
Posted: Mon May 03, 2004 9:45 pm
by meowmix11
do i put this in the main map script or in a secondary map script file? help me please im really confused.
Posted: Mon May 03, 2004 9:52 pm
by blue60007
meowmix11 wrote:do i put this in the main map script or in a secondary map script file? help me please im really confused.
There should be one 'main' script: mymapname.scr, then there is a precache script: mymapname_precache.scr, the latter is used to precache models and such, and the first is where your scripting goes, so to answere your question, it needs to go in the mymapname.scr.
Posted: Mon May 03, 2004 9:58 pm
by meowmix11
so, if i wanted to spawn a crate in a map, i would put the script in the mymapname.scr?
for example, where would i put this:
local.static = spawn script_model
local.static model "static/indycrate.tik"
local.static.origin = ( -591.85 -647.96 668.13 )
local.static.angles = ( 0 90 0 )
local.static solid
Posted: Mon May 03, 2004 10:11 pm
by blue60007
well of course you should change 'mymapname' to whatever it is.
I think this is right:
Code: Select all
level waittill prespawn
local.static = spawn script_model
local.static model "static/indycrate.tik"
local.static.origin = ( -591.85 -647.96 668.13 )
local.static.angles = ( 0 90 0 )
local.static solid
level waittill spawn
Posted: Mon May 03, 2004 10:43 pm
by meowmix11
thanks

Posted: Mon May 03, 2004 10:46 pm
by blue60007
meowmix11 wrote:thanks

no problema

Posted: Mon May 03, 2004 10:50 pm
by meowmix11
blue60007 wrote:well of course you should change 'mymapname' to whatever it is.
I think this is right:
Code: Select all
level waittill prespawn
local.static = spawn script_model
local.static model "static/indycrate.tik"
local.static.origin = ( -591.85 -647.96 668.13 )
local.static.angles = ( 0 90 0 )
local.static solid
level waittill spawn
i tried this and put tho origin where i wanted it, but it did not spawn.

is the coordinates different in spearhead than in Alied Assault?
Posted: Mon May 03, 2004 10:54 pm
by blue60007
Maybe try putting it after the waittill spawn, no the coords (vector) are the same in SH. We need a pro here to confirm this.
Posted: Mon May 03, 2004 11:03 pm
by meowmix11
blue60007 wrote:Maybe try putting it after the waittill spawn, no the coords (vector) are the same in SH. We need a pro here to confirm this.
nope, still dosn't work

Posted: Mon May 03, 2004 11:39 pm
by blue60007
meowmix11 wrote:blue60007 wrote:Maybe try putting it after the waittill spawn, no the coords (vector) are the same in SH. We need a pro here to confirm this.
nope, still dosn't work

Let's try this:
Code: Select all
level waittill spawn
thread spawncrate
spawncrate:
local.static = spawn script_model
local.static model "static/indycrate.tik"
local.static.origin = ( -591.85 -647.96 668.13 )
local.static.angles = ( 0 90 0 )
local.static solid
end
Anyone for suggestions?
Posted: Tue May 04, 2004 1:40 am
by meowmix11
blue60007 wrote:meowmix11 wrote:blue60007 wrote:Maybe try putting it after the waittill spawn, no the coords (vector) are the same in SH. We need a pro here to confirm this.
nope, still dosn't work

Let's try this:
Code: Select all
level waittill spawn
thread spawncrate
spawncrate:
local.static = spawn script_model
local.static model "static/indycrate.tik"
local.static.origin = ( -591.85 -647.96 668.13 )
local.static.angles = ( 0 90 0 )
local.static solid
end
Anyone for suggestions?
nope

Posted: Tue May 04, 2004 1:59 am
by blue60007
Poop! That should work...
Posted: Tue May 04, 2004 6:09 am
by bdbodger
Post your whole script and what the map name is and the script name and what directories you used for them . spawning is an easy thing to do so we need and idea of what you are doing wrong .