Problem:
I can keep rotating my lever. But I don’t want that.
The script
//==============================================
//========= Lifting Ramp ==================
//==============================================
lifting_ramp_trigger
{
spawn
{
accum 5 set 1 // Initial state is down
wait 500 // Wait for everything to settle
trigger lifting_ramp_trigger main // Move switch into correct position
}
trigger main
{
trigger lifting_ramp_trigger up
trigger lifting_ramp_trigger down
}
trigger up
{
accum 5 abort_if_not_equal 1 // Ready to run up routine == 1
resetscript // wont return to trigger that called it
trigger lifting_ramp_switch up
accum 5 set 0 // Setup accum for up routine
}
trigger down
{
accum 5 abort_if_not_equal 0 // Ready to run down routine == 0
resetscript // wont return to trigger that called it
trigger lifting_ramp_switch down
accum 5 set 1 // Setup accum for up routine
}
}
lifting_ramp_switch
{
spawn
{
}
trigger up
{
playsound sound/movers/switches/butn2.wav
setrotation 0 0 -90
wait 500
stoprotation
}
trigger down
{
playsound sound/movers/switches/switch.wav
setrotation 0 0 90
wait 500
stoprotation
}
}
Should I set the func_inv_user invisible when triggered?
Sorry about the darkness didn’t really put lighting in it yet.