Page 1 of 1
targetname of bomb
Posted: Mon Feb 07, 2005 3:30 pm
by sg.Pepper
HI, I HAVE A QUSTION:
i create an obj MP map with 5 bombs (targetname $bomb1....5).
And i want to know a targetname of bomb, which was just planted or defused, for better orientation of players.
Can somebody help?
thanks
Posted: Wed Feb 09, 2005 8:37 am
by bdbodger
If you are useing the obj_dm.scr then you set the trigger_name key on the bomb to the targetname of the trigger to tell the script what trigger controls the bomb right ?.
bomb_waittill_set:
self model items/pulse_explosive.tik
while ( $(self.trigger_name) )
{
println "waittill trigger " self.trigger_name
self.trigger_name waittill trigger
local.player = parm.other
//"local.player.dmteam", can be 'spectator', 'freeforall', 'allies' or 'axis'
if (local.player.dmteam != level.planting_team)
{
goto bomb_waittill_set
println "failed dmteam check" local.player.dmteam
}
You can just edit the obj_dm.scr in these threads or maybe use a setthread value on the trigger
if (local.counter >= level.bomb_set_time)
{
iprintlnbold "A Bomb has been planted!"
if (level.planting_team == "allies")
self playsound dfr_objective_o
else
self playsound den_objective_o
thread bomb_waittill_defuse
thread bomb_waittill_explode
self.live = 1
level.bombs_planted ++
end
}
wait .1
if (local.counter >= level.bomb_defuse_time)
{
iprintlnbold "A Bomb has been defused!"
if (level.defusing_team == "allies")
self playsound dfr_diffused_d
else
self playsound den_diffused_d
thread bomb_waittill_set //start first thread again
self.live = 0
level.bombs_planted --
end
}
Posted: Wed Feb 09, 2005 6:46 pm
by jv_map
Ooh looks like a double-post... please concentrate the discussion in this thread:
/forum/viewtopic.php?t=9789
