spawn in point with coordinats 0 0 0 ?


(Yojo) #1

this is very strange.
as u guys now, i am scripting airplanes in my map.
i got the following:
spawn
{
faceangles 0 180 0 1000
gotomarker p2start 1000
wait 3000
}

but when i start map, i see the plane spawning in the point 0 0 0 and then i see it flying to straight through everything to p2start.? it should spawn in the place where i putted the model, so it doesn’t crashes through the map.
can i put the origin where it should appear in the script?


(Loffy) #2

I am assuming that your plane is a script_mover.
Check to make sure that your script_mover has an origin brush.
//Loffy


(Yojo) #3

it doesn’t follow splines but uses the RTCW technic with path corners
will try with the origin.

EDIT: little update in the problem.
i created an origin brush, i applied script_mover to it then entered the key model2 with value the path to my model.

i gave it script and targetname attack2 (wich is my function name)

when i boot ET i get error: function script_mover must asign to a “model”
i thought the model2 was fixing that?


(Loffy) #4

Hm, I wonder what it could be? Have you tried to create the script_mover first, then the origin-brush, and then move origin-brush into the mover? (And not the mover into the origin, I mean.)
//Loffy


(Yojo) #5

my airplane has no clips, so the origin is the only script mover…


(S14Y3R) #6

When you compile the map, have your script_mover mapped in closer to your starting path. So it doesn’t have to cross the map to get there. Also, you could crank up the speed in your spawn gotomarker to llike 10’000 so you don’t see it flying to the starting point.

Does it fly the rest of the route okay?

add:when creating your script_mover, make sure your brushwork and origin are both selected.


(Yojo) #7

i think i am messing the 2 things. first off all i don’t think a origin brush when i am working with path corners.
i have a model then i got a path with path_corners, and then finally a trigger brush with classname script_moved, also containing a model2 key.
then everything went fine (except then initialization in 0 0 0) , till i changed that trigger to origin, then i got the error.
EDIT/ found another strange thing. the model is actually doing nothing behind the mountain… it stands there and does notihng. :s
so there is a second plane, and that spawns in 0 0 0
there should be a way to make it spawn somewhere else. so i removed the model itself and it still does the same thing actually :p. but now i got to find out how i can make the plane spawn correct.


(carnage) #8

in rtcw there was a problem in mp with cript mover that had models attached i belive that made them spawn at point 0 0 0 or something

since ET is built with rtcw code (i think) this might be the same problem… i would surgest trying to set it up as a spline path


(Yojo) #9

strange, i looked in meanwhile in break-out
the map uses the same technique i am using… and it hasn’t the problem :s

the reason why i didn’t use splines is because i can’t make the plane rotating as much as i make them doing now. (or can i ?)


(EB) #10

If you can explain in better english,(your previous post is not clear) then I will join in the crusade.
Start over and explain ALOT better, ok ?


(Yojo) #11

ok here i go
i created a brush; classname: scriptmover
model2: /path/to/model
target/scriptname: attack

then i created some pathcorner named p2start near it.

i made a path using pathcorners, name p2step 1/2/3/4/5/…

and the following script
//AIR RAIDS
attack
{
spawn
{
faceangles 0 180 0 1000
gotomarker p2start 10000
wait 3000
}

trigger on
{
	alertentity plane2sound1
	gotomarker p2step1 500
	faceangles 0 360 0 gototime
	alertentity plane2sound2
	gotomarker p2step2 500
	faceangles 0 360 90 gototime
	gotomarker p2step3 500
	faceangles 0 270 90 gototime
	gotomarker p2step4 500
	faceangles 0 270 65 gototime
	gotomarker p2step5 500
	faceangles 0 270 0 gototime
	gotomarker p2return1 500
	faceangles 0 270 0 gototime
	gotomarker p2return2 500
	faceangles 0 0 0 gototime
	gotomarker p2start 500
	faceangles 0 0 0 gototime
}

}

what happens when i start map? the plane appears in point 0 0 0 and then flies towards p2step1. after that it flies correctly following the path.
it ends up in p2start.
so everything works fine except the spawning.


(EB) #12

Still seems like you’re leaving bits out…

Email me the .map and .script
etmaps@gmail.com


(kamikazee) #13

Tried setposition <target> in the spawn trigger instead of gotomarker?
BTW: the wait should go in front of the other commands in the spawn trigger IIRC. The commands may be called before the model is spawned.


(Yojo) #14

i mailed all the stuff to EB

ow btw… setposition shouldn’t that be in spawn?


(kamikazee) #15

Yes, but the wait 300 should be the first command in the spawn trigger.
The setposition should be placed instead of the gotomarker in the spawn trigger, that way the player can never see the plane moving to it’s starting position.


(Yojo) #16

so it should be
spawn
{
faceangles 0 180 0 1000
setposition x y z
wait 3000
}

?

EDIT: tried that, still does the same


(kamikazee) #17

No, THIS is what I meant.

spawn
{
wait 300
faceangles 0 180 0 1000
setposition p2start
} 

(Yojo) #18

ow will try it directly
EDIT : still the same :frowning:


(EB) #19

@Yojo: I e-mailed you the fixed files.

There were a dozen errors I had to fix in the map.
You had alot of things that were not PROPERLY setup and so I ask you to slow down and learn as you go.

-Afterall, nobody can help you if you aren’t able to explain exactly what is wrong…

The script wasn’t even the problem.


(Yojo) #20

ok danke eb,
can u tell me what you changed so i can also learn a bit from it so i don’t make the same mistake ever again? i found out about the origin so far. mail it or something :slight_smile: