Page 1 of 1

Bridge Bombing Objective

Posted: Mon Mar 22, 2004 3:52 am
by Lone_Rebel
Okay here goes, I am trying to make an objective map where you use a radio to "call in an artillery strike", and a bridge in the map blows up. Right now I have it so that when you "use" a triggeruse around the radio the bridge explodes. But how do I make it so you must hold use for a certain amount of time (like when setting a bomb) then you win and the bridge explodes.

Posted: Mon Mar 22, 2004 4:07 am
by kai0ty
right before the explosion part in the script put wait 10 (ten seconds is how long it takes to set a bomb but u can make it whatever you cant to fit your cause)

Posted: Mon Mar 22, 2004 4:32 am
by Splaetos
that would delay the explosion, but to make a time activated trigger look at the bombthinker script

you want the same logic it uses for setting, you just have to modify the result to suit your purpose.

Posted: Mon Mar 22, 2004 4:44 am
by bdbodger
try this

mythread:
local.counter = 0
local.player = parm.other
while(local.player.useheld == 1)
{
local.counter++
if(local.counter == 10) // break out of the loop if counter hits 10
break
wait 1
}
if(local.counter == 10) // check that player didn't let go of use key before it hit 10
{
do explosion stuff here
....
....
}
end

Posted: Mon Mar 22, 2004 4:44 am
by kai0ty
woopsy, readin too fast. to make it more realistic you could make the call instant, and as a defuse u have to kill a tracing devise that appears once the raio is used....