Reusing Barriers - Possible? Reasonable?


(Eh?) #1

Well this scripting stuff isn’t quite as bad as it first looks. Getting the hang of it, but I’m still more in read-and-adapt than write-from-scratch mode. My first map borrows heavily from Goldrush, but is a bit different for the sake of variety.

The plan for the map was this:

  • Allies escort truck after blowing 2 barriers.
  • Allies steal gold crates and put them on the truck.
  • Allies escort truck back the way they entered, past the same two truck barriers - which in the mean time may have been re-constructed by the axis.

Naturally I don’t see how to adapt the Goldrush script to do this in a reasonable fashion. Unless someone’s hiding the ‘if’ statement somewhere… :???:

I’m sure it’s possible to do this - my question is mainly about whether it’s reasonable to do this. Any suggestions are appreciated…


(Mean Mr. Mustard) #2

I think it would be possible. When the truck first goes ‘through’ the barrier, setstate the contruction crates and trigger to invisible (goldrush probably does a kill - which removes the barrier from the map!) Then, say when the gold is loaded, setstate the barrier crates and trigger to default to make them appear again.


(Eh?) #3

Thanks for the feedback, Mustard - that’s how I’d like it to work, except the crates/barrier entities should be available until the truck makes the second pass. The specific problem I’m running into is as follows:


	trigger stuck_check_barrier3
	{
		accum 3 abort_if_not_equal 7
		accum 1 abort_if_not_bitset 0
		accum 1 bitset 3
	}

This code works great to stop the truck if the first barrier is built (truck location tracked via accum 3) the first time the truck approaches the barrier. I can’t figure out, though, how to make some sort of 'if the truck has already passed barrier 3 on the way in, then check to see if accum 3 is 30.

EDIT: In asking the question I may have come up with a solution: Just create another trigger like stuck_check_barrier3a and do the appropriate check there…


(Mean Mr. Mustard) #4

EDIT: In asking the question I may have come up with a solution: Just create another trigger like stuck_check_barrier3a and do the appropriate check there…

I think that is the easiest (and maybe only) way to do what you want.