I think an accum has 32 bits… so plenty left to code with…
Yes i know :-)… it’s funny…
You must create some additional stuck-checks for the truck (or maybe 1 if the objectives are all loaded at the same spline)…
This stuckcheck contains the spline where the truck should stop… (just like the barricade stuck-checks)
…and You must create some trigger(s) for the truck so it knows when an objective is loaded onto the truck (and it can continue moving again)… (much like the trigger barricade1_constructed, only then an objective1_loaded trigger)
Then add some code to the trigger_flagonly_multiple’s death-event ,where the objectives are delivered, to inform the truck that an objective has been loaded.
That is all…
I could add this to the Prefab-Generator one of these days…
— edit -----------------------
To dwe_flame:
I just took a look at Your map & script, but it is not entirely complete… i do not see the entities for: gold_crate, gold_full_0, gold_full_1, gold_trans_0 & gold_trans_1…
I also notice You have 2 scriptblocks for goldbar_holder…
But anyway… add the following to Your the truck script You posted:
in trigger stuck_check add the check to see if all objectives have been loaded:
trigger stuck_check
{
accum 3 bitreset 1
trigger self stuck_check_scriptlockout
trigger self stuck_check_finished
trigger self stuck_check_barrier1_built
trigger self stuck_check_barrier2_built
trigger self stuck_check_barrier3_built
trigger self stuck_check_barrier4_built
trigger self stuck_check_objectives_loaded
}
Also add the trigger stuck_check_objectives_loaded:
trigger stuck_check_objectives_loaded
{
accum 1 abort_if_not_equal 50
accum 5 abort_if_equal 2
accum 3 bitset 1 // stuck
}