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
targetname of bomb
Moderator: Moderators
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 ?.
You can just edit the obj_dm.scr in these threads or maybe use a setthread value on the triggerbomb_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
}
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
}

