Get rid of thread floordoor_mover in the main script.
That should be called by the trigger. So, in Radiant, you should have your trigger with a k/v of setthread/floordoor_mover
Hmmm, how does the thread know what "self" is? I don't think the trigger's targetname is automattically sent the the thread with "setthread". It would probably work just the same with those two lines remove--now that it has "waitmove".
One way to test it would be to add these lines to the bottom of the thread.
local.name = self // or is it "self"?
iprintln "self = " (local.name)
or maybe just
iprintln self
You could also test if the trigger is triggerable by increacing the "wait .1" at the bottom. If the door opens again right after it closes (while standing in the trigger or hitting use), then the nottriggerable was never set. If that is the case, you could fix it by replacing "self" with "$floordoor_trigger" in the thread.
As you can probably tell, I hate using "self" in threads that are triggered by only one trigger. What kind of trigger is it?
// Mammut Radar - Objective Version
// ARCHITECTURE: Shifty (Ian Allen)
// SCRIPTING: Shifty
main:
setcvar "g_obj_alliedtext1" "Destroy The Radar"
setcvar "g_obj_alliedtext2" "Destroy The Power"
setcvar "g_obj_alliedtext3" "Room"
setcvar "g_obj_axistext1" "Defend the Radar"
setcvar "g_obj_axistext2" "Defend The Power"
setcvar "g_obj_axistext3" "Room"
setcvar "g_scoreboardpic" "none"
level waitTill prespawn
exec global/DMprecache.scr
exec global/door_locked.scr::lock
level.script = obj_mammutradar.scr
exec global/ambient.scr mohdm7
thread global/exploder.scr::main
level waittill spawn
floordoor_mover:
self nottriggerable
$floordoor playsound door_wood_open_move1
$floordoor time 2
$floordoor rotateXup -90
$floordoor waitmove
$floordoor playsound door_wood_open_stop
wait 20 //since you want your door to stay open for 20 seconds
$floordoor playsound door_wood_close_move1
$floordoor time 2
$floordoor rotateXdown -90
$floordoor waitmove
$floordoor playsound door_wood_close_stop1
wait .1
self triggerable
end
level.defusing_team = "axis"
level.planting_team = "allies"
level.targets_to_destroy = 2
level.bomb_damage = 200
// Set the parameters for round based match
level.dmrespawning = 0 // 1 or 0 (0=no respawn)
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = axis // set to axis, allies, kills, or draw
// level waittill roundstart // Comment out this line using '//' before it to be able to set the bomb when alone on the map ( just for testing )
$panel_bomb thread global/obj_dm.scr::bomb_thinker
$pr_bomb thread global/obj_dm.scr::bomb_thinker
thread allies_win_bomb
$panel_bomb thread axis_win_timer
$pr_bomb thread axis_win_timer
end // end of main
// Allied victory test
allies_win_bomb:
while(level.targets_destroyed < level.targets_to_destroy)
waitframe
teamwin allies
end
// Axis victory test
axis_win_timer:
level waittill axiswin
end
Also I have another request for some reason i've managed to delete the read me i wrote and my memory is so bad I dont wanna miss thanking some one for there help - so if you've downloaded one of the pre - betas can you send me the readme please
All thats left to do now is get the script right and clean up some minor things that I've noticed and I'll be releasing the Official Beta
tltrude wrote:Hmmm, how does the thread know what "self" is?
Since that trigger called the thread, that trigger is its owner, therefore it follows that "self" is in fact the trigger. At least that is my understanding.