hey all
ive got a problem with my map / script…
i have this door/energyfield, moving up and down by a button, which is a script_mover
(it works)
i also have a generator (simulated by a button at the moment)
when the generator is blown up (press button) i want the door to dissapear (“remove”)
this works too…
but now, when i press the button again (generator constrcuted again) i want the door to come back alive, and this is where the problem starts…
it comes with an error “G_scripting: alertentity, targetname cannot be found: door_1” (or something like that, it says it cant find the targetname “door_1”
my script is like this:
gen1 // The button which simulates the generator
{
spawn
{
globalaccum 0 set 1 //0 = Gen destr, 1 = Gen constr
accum 2 set 1
wait 500
trigger gen1 main
}
trigger main
{
trigger gen1 on
trigger gen1 off
}
trigger on
{
accum 2 abort_if_not_equal 1
resetscript
wm_announce "The Main Generator has been constructed, Energy Field on."
trigger door_1 revive
globalaccum 0 set 1
accum 2 set 0
}
trigger off
{
accum 2 abort_if_not_equal 0
resetscript
wm_announce "The Main Generator has been destroyed, Energy Field off."
trigger door_1 kill
globalaccum 0 set 0
accum 2 set 1
}
}
door_1
{
spawn
{
}
trigger open
{
wait 500
gotomarker door_pos2 35 wait
}
trigger close
{
wait 500
gotomarker door_pos1 35 wait
}
trigger kill
{
wait 20
remove
}
trigger revive
{
wait 20
alertentity door_1
}
}
The “trigger open” and “trigger close” commands are triggered from the door1_trigger (another button), but because the moving works i didnt see any reason to put them in…
The entity:
// entity 23
{
"health" "0"
"target" "door_1"
"scriptname" "door_1"
"targetname" "door_1"
"spawnflags" "10"
"classname" "script_mover"
Insert a couple of brushes here...
}
And the error again, it cant find “targetname - door_1”
and the script_mover has a targetname of door_1… so i dont get it :???:


