script_mover - ends up at wrong place (map origin)


(Loffy) #1

Hi!

tst_screamingjet // This is just a target_sctipt_trigger. It fires the “move_jet” part inside the screaming_jet-script below.
{
spawn
{
wait 100
}

trigger start_jet
{
trigger screaming_jet move_jet // See below!
alertentity jet_passing1 // A speaker.
}
}

screaming_jet
{
spawn
{
wait 50
followspline 0 spln1 500 length 32 wait // After a wait 50, it goes to the first spline and waits there.
}

trigger move_jet // This part of the script is triggered (by some actions in the map)
{
followspline 0 spln2 500 wait length 32
trigger screaming_jet move_jet2
}

trigger move_jet2
{
followspline 0 spln3 500 wait length 32
trigger screaming_jet move_jet3
}

trigger move_jet3
{
followspline 0 spln4 500 wait length 32
trigger screaming_jet move_jet4
}

trigger move_jet4
{
followspline 0 spln5 500 wait length 32
}
}

The script mover moves fine in the map, along the first splines. But it ends up at a bad place. When it has run all splines, it (for some odd reason) goes to the centre of the map. The maps xyz-origo. Why? How can I make the script mover follow the splines nicely AND stay at the end-spline?

It has an origin-brush.

Not urgent. But frustrating.
// Loffy


(Shaderman) #2

I think you need one more spline point (spln6) in your map and use it as target for spln5.


(MadJack) #3

Don’t tell the mover to follow the last spline if it doesn’t have a target (or that target doesn’t exist). If you do, not knowing where to go, the movers will end up on the map’s origin.

Check for spelling/typo. I had that behavior because of that on a couple of occasion.

The same goes for control points.

EDIT: It’s TARGET, not TARGETNAME. Sorry about that.

Also, if the spl4 is your last spline, you don’ t need to call it as you did since at the end of spl3 it’s at spln4.

Last, it’s [ CODE ] not [ QUOTE ] :stuck_out_tongue: lol :smiley:


(Loffy) #4

Thx guys! That makes perfec sense. Will try it.
// Loffy