hey
well… im trying to make an energy barrier (ever seen starwars ep 1? the part at the end… you know what i mean
) which goes up and down when you press a button.
This works like a charm so far 
But now my next try… im trying to make a generator which (if blown up) will make the energy barrier go away (invisible) and when repaired will make it come back.
(Because im lazy and dont want to wait for dynamite to blow everytime i made 2 buttons for testing it…)
But now the problem… when the energybarrier is up (not moving, it’s a script_mover ofcourse) it works perfectly, going on and off like i want it.
But when it’s moving and i press the button, it doenst dissapear. I figured this might just be builtin in the engine that a script_mover while moving cannot be made invisible (setstate … invisible).
BUT when the energybarrier is all the way up when i pressed the button while going up, it stays ON instead of going off when it stops moving!
I have no idea how to fix the prob…
here is part of my script:
The moving energyfield called “door_1” (i know, it’s from the tut… -_-’ )
door_trigger1
{
spawn
{
accum 5 set 1
wait 500
trigger door_trigger1 main
}
trigger main
{
trigger door_trigger1 up
trigger door_trigger1 down
}
trigger up
{
accum 5 abort_if_not_equal 1
resetscript
trigger door_1 open
accum 5 set 0
}
trigger down
{
accum 5 abort_if_not_equal 0
resetscript
trigger door_1 close
accum 5 set 1
}
}
The actual moving of the energyfield
door_1
{
spawn
{
}
trigger open
{
wait 500
playsound sound/scenaric/assault/big_gate1.wav
wait 400
playsound sound/scenaric/assault/big_gate2.wav looping forever
gotomarker door_pos2 35 wait
stopsound
playsound sound/scenaric/assault/big_gate3.wav
}
trigger close
{
wait 500
playsound sound/scenaric/assault/big_gate1.wav
wait 400
playsound sound/scenaric/assault/big_gate2.wav looping forever
gotomarker door_pos1 35 wait
stopsound
playsound sound/scenaric/assault/big_gate3.wav
}
}
The “generator” script (2 buttons so far but i guess the principal involved is the same)
gen1
{
spawn
{
accum 3 set 1
wait 500
trigger gen1 main
}
trigger main
{
trigger gen1 on
trigger gen1 off
}
trigger on
{
accum 3 abort_if_not_equal 1
resetscript
wm_announce "The Main Generator has been destroyed, Energy Field off."
setstate door_1 invisible
accum 3 set 0
}
trigger off
{
accum 3 abort_if_not_equal 0
resetscript
wm_announce "The Main Generator has been constructed, Energy Field on."
setstate door_1 default
accum 3 set 1
}
}
As i said, when the script_mover is not moving it works, but when it is moving it doenst.
But i hoped it would still change it’s “setstate” after it stopped moving… no luck so far…
This would ofcourse mean that destroying the generator while someone moves the script_mover will make the energyfield stay on (or off) forever (if the axis play it smart and dont construct it again lol)… which is ofcourse not what i want :moo:
damn
long post…
EDIT
i just thought of adding the “accum 5” value from above which checks if the door is ready to go open or close to the last part of the script, but it would give the same problem… it cant stop the generator being blown when the script_mover is moving… :S

