hello mapping types
… spot of trouble with one of the script movers in my map saga that one of you clever mapping people might be able to help me with. Affraid I’m pretty much lost on this 1
Basically it is all ok, can be fixed and destroyed, appears on the map, follows the splines etc. Trouble is that when the player gets away from the mover it carries on going!!
Will only stop if it gets damaged.
Here are the relevant parts of the script:
//STUCKCHECK////////////////////////////////////
trigger stuck_check
{
accum 1 bitreset 3
trigger train stuck_check_scriptlockout
trigger train stuck_check_finished
}
trigger stuck_check_finished
{
accum 3 abort_if_not_equal 106
accum 1 bitset 3
}
trigger stuck_check_scriptlockout
{
accum 1 abort_if_not_bitset 4
accum 1 bitset 3
}
//STOPCHECK///////////////////////////////////////////////
trigger stopcheck_setup
{
accum 1 bitset 6 // stop - no pushing
accum 1 abort_if_bitset 8 // no one in the trigger, abort
trigger train stuck_check // call the stop check function
accum 1 abort_if_bitset 3 // we're stuck so break out
accum 1 bitreset 6 // we're free to keepgoing
}
trigger stopcheck
{
trigger train stopcheck_setup
accum 1 abort_if_not_bitset 6
trigger train script_lockout
// Any just stopped moving stuff goes here
trigger train_engine stop
//trigger truck wheels_stop
// <<<<< stop animation goes here
trigger train script_lockout_stop
resetscript
}
// ========================================
// ========================================
// ========================================
// script lockouts
trigger script_lockout
{
accum 1 bitset 4
}
trigger script_lockout_stop
{
accum 1 bitreset 4
}
// ========================================
// ========================================
// ========================================
// enable/disable
trigger train_enable
{
trigger train stuck_check
accum 1 abort_if_bitset 3 // stuck check
accum 4 set 0 // reset stop counter
accum 1 bitreset 8 // reset stop check
accum 1 abort_if_bitset 2 // already following spline
accum 1 abort_if_bitset 4 // script lockout
accum 1 abort_if_bitset 7 // death check
// Any just started moving stuff goes here
trigger train_engine start
// <<<<< start animation goes here
trigger train move
}
trigger train_disable
{
accum 4 inc 1 // up the stop counter
accum 4 abort_if_less_than 2
accum 1 bitset 8
trigger train deathcheck
}
This script is purely a conversion from the truck mover that works fine in my map
Any ideas very welcome and much appreciated
