truck gets to the end spline and zooms off to centre of map


(mrfin) #1

Hello mapping types

Now there have been posts about this before that I have read but lo and behold my lovely truck is still zooming off after the last spline!

Here are the relevant parts of my script as they stand -
(the end spline in the map is no. 98)


accum 3 trigger_if_equal 95 truck run_96
accum 3 trigger_if_equal 96 truck run_97
accum 3 trigger_if_equal 97 truck run_98


trigger run_97
{
accum 1 bitset 2
followspline 0 tspln_98 0 wait length 304
accum 1 bitreset 2
accum 3 set 97
trigger truck run_continue

}

trigger run_98
{
accum 1 bitset 2
followspline 0 tspln_98 0 wait length 304
accum 1 bitreset 2

trigger truck 		wheels_stop 

}

plz excuse dimness!

help much appreciated :cool:


(mrfin) #2

sorry…end spline is 98!


(zl1corvette) #3

I am gonna guess that spline 98 doesn’t have a target, you don’t what to follow your last marker because it has no target thus no path. Plus it seems your following spline 98 twice in your script for some reason, under run_97 & run_98. I am gonna guess one of those will solve your problem, or maybe both :smiley:


(mrfin) #4

nice quick response…thnks zl1corvette

I am gonna guess that spline 98 doesn’t have a target

… indeed…no.98 doesnt have a target

so…ill remove this:
followspline 0 tspln_98 0 wait length 304
…from trigger run_98!?

thanks again


(mrfin) #5

oops…forgot to end quote


(mrfin) #6

ok…this is fun…****

I did the above and lo and behold the truck dissapears still - and the game crashes!

Does spline 98 need a target?


(The Wanderer) #7

First of all why are your dispach triggers one off (i.e. accum 3 trigger_if_equal 96 truck run_97). That’s just asking for trouble.
Anyway is 98 your last spline? If so then remove trigger run_98 because that spline has nowhere to go.
run_97 should be your last trigger.(basically going from spline 97 to 98 )


(mrfin) #8

ok…latest is that I took out the repeating follow comand and the truch stops at last

… but then the game freezes…!!

Will take a look at some other scripts


(mrfin) #9

ok…at last it works…truck stops and the game continues!!

For reference - good or bad here are the two relevant bits of script - the end spline is still 98

trigger run_97
{
	accum 1 bitset 2
	followspline 0 tspln_97 0 wait length 304
	accum 1 bitreset 2
	accum 3 set 97
	trigger truck run_continue 
	
}

	trigger run_98
{
	accum 1 bitset 2
	accum 1 bitreset 2
	accum 3 set 98
	
	trigger truck stopcheck 
		
	trigger truck 		wheels_stop 

}


accum 3 trigger_if_equal 96 truck run_97
accum 3 trigger_if_equal 97 truck run_98

patience is a virtue when it comes to this business!


(mrfin) #10

:cool:


(mrfin) #11

thanks wanderer

First of all why are your dispach triggers one off (i.e. accum 3 trigger_if_equal 96 truck run_97). That’s just asking for trouble.

the dispatch for the truck in goldrush is this way - I just (all knowingly :wink: copied it - seems ok now though


(Malverik) #12

just a question
is that your speed that is set to 0? how does it work out like thatÉ


(mrfin) #13

is that your speed that is set to 0? how does it work out like thatÉ

oops…didnt notice that…thanks