Cant spawn anything in Spearhead!

Post your scripting questions / solutions here

Moderator: Moderators

meowmix11
Lance Corporal
Posts: 24
Joined: Sun May 02, 2004 6:22 pm

Cant spawn anything in Spearhead!

Post 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
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post 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.... :wink:

if you need more clarity let me know...
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
meowmix11
Lance Corporal
Posts: 24
Joined: Sun May 02, 2004 6:22 pm

Post by meowmix11 »

do i put this in the main map script or in a secondary map script file? help me please im really confused.
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post 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.
Image
meowmix11
Lance Corporal
Posts: 24
Joined: Sun May 02, 2004 6:22 pm

Post 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
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post 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



Image
meowmix11
Lance Corporal
Posts: 24
Joined: Sun May 02, 2004 6:22 pm

Post by meowmix11 »

thanks :D
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post by blue60007 »

meowmix11 wrote:thanks :D
no problema :D
Image
meowmix11
Lance Corporal
Posts: 24
Joined: Sun May 02, 2004 6:22 pm

Post 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?
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post 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.
Image
meowmix11
Lance Corporal
Posts: 24
Joined: Sun May 02, 2004 6:22 pm

Post 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 :cry:
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post 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 :cry:
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?
Image
meowmix11
Lance Corporal
Posts: 24
Joined: Sun May 02, 2004 6:22 pm

Post 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 :cry:
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 :shock:
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post by blue60007 »

Poop! That should work...
Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post 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 .
Image
Post Reply