Script_mover


([rD]MrPink) #1

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?


([rD]MrPink) #2

Come on, theres got to be SOMEONE who can!


(Thej) #3

did u add origins to the script_movers??

And wht exactly is wrong, doesnt it work at all?


([rD]MrPink) #4

OK, I have greatly simplified the mover’s brushes/the script file, but it still doesn’t work. The object never moves. I have 3 brushes in my mover, a origin in the center, and two to make the thing. At the other end I have a func_invisible_user targeting a target_script_trigger. The func_invisible_user is called button_01. the target_script_trigger’s script name is move_target1. The script name of the mover is target1. My rewritten script goes:

move_target1
{
spawn
{
accum 1 set 0
}
trigger button_01
{
accum 1 abort_if_not_equal 0
trigger target1 move_dest
}
trigger button_01
{
accum 1 abort_if_not_equal 1
trigger target1 move_start
}
}

target1
{
trigger move_dest
{
gotomarker target1point2 100
accum 1 set 1
wait 5000
}
trigger move_start
{
gotomarker target1point1 100
accum 1 set 0
wait 5000
}
}