EDIT -LOOK TO THIRD POST, REWRITTEN, MUCH SIMPLER.
My Script mover isn’t working, I think its in the script file.
script_mover targetname= mantarget1
" " scriptname = target1
func_invisible_user targetname = target1butt
" " scriptname = target1button
target_script_trigger scriptname = target1trigger
path_corner 1 = target1forward
path_corner 2 = target2 back
When you push the button this object which is at the back is supposed to come forward. When you hit the button again, it should go back. The script file is as follows:
target1trigger
{
spawn
{
}
trigger target1
{
trigger target1butt move_in
trigger target1 move_forward
trigger target1 move_back
}
}
target1button
{
trigger move_in
{
gotomarker button_in 16 wait
}
trigger move_out
{
gotomarker button_out 16 wait
}
}
target1
{
spawn
{
accum 1 set 0
}
trigger move_forward
{
accum 1 abort_if_not_equal 0
gotomarker target1foward 32 wait
trigger target1button move_out
accum 1 set 1
}
trigger move_back
{
accum 1 abort_if_not_equal 1
gotomarker target1back 32 wait
trigger target1button move_out
accum 1 set 0
}
}
Can anyone spot an error?