Home   Help Search Login Register  

Author Topic: Detecting whether a pipe bomb is set off?  (Read 871 times)

0 Members and 1 Guest are viewing this topic.

Alaskan

  • Guest
Detecting whether a pipe bomb is set off?
« on: 14 Nov 2002, 06:15:43 »
I'm wondering if it's possible to detect when a pipebomb or a timebomb is set off in a certain area. I think it is possible with a trigger, but I don't have enough knowledge of the commands that might do so.

The areas would be target zones, all of which would need to be destroyed before the mission could end. So now assuming it's possible, I'd need to be able to end the mission after the targets havebeen bombed

Kaliyuga

  • Guest
Re:Detecting whether a pipe bomb is set off?
« Reply #1 on: 14 Nov 2002, 08:05:46 »
  Hmm... one way to do it is to use this for your trigger

Condition:objectname getdammage < .15


on activation: (use this spot to make your objective completed)

*********************************************

you can repeat that.. changing the objectname around for each one...

what this will do is trip the trigger off when the dammage done to the specified object becomes damaged by 15% or more, you can of course alter that number between 0 and 1
.. usually at about .1 and lower, a single bullet is enough to trip the trigger off

Offline Dinger

  • Contributing Member
  • **
  • where's the ultra-theoretical mega-scripting forum
Re:Detecting whether a pipe bomb is set off?
« Reply #2 on: 14 Nov 2002, 18:57:44 »
The more complicated way:
add an eventhandler to every unit capable of placing a time bomb, for event "FIRED"
check to see if _this select 4 is "PipeBomb" (test this to get the exact case and spelling), if so, assign a variable to
nearestobject [_this select 0, _this select 4]
then check to see if that variable is in the detonation areas you want.  If it isn't forget about it.  If it is, wait for the object's position to go to 0,0,0 (=detonated. you only need a getpos _mypipebomb select 0 == 0), then throw a boolean (like area1 = true).  Have a trigger when all booleans are true, and you're done. easy.
Dinger/Cfit

Alaskan

  • Guest
Re:Detecting whether a pipe bomb is set off?
« Reply #3 on: 18 Nov 2002, 11:25:51 »
I understood all of that up befre "FIRED". You lost me after that.

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re:Detecting whether a pipe bomb is set off?
« Reply #4 on: 18 Nov 2002, 20:59:56 »
;D Dinger there is showcasing some heavy-arsed Resistance coding...as if he wasn't bad enough playing with the 1.46 commands.... :toocool:

In any case, the classic method is as Kaliyuga there explained, although you might as well use "!alive Target", since you DO want it destroyed, right? In any case a satchel charge knocks pretty much anything off its feet.

The real question here is what exactly you're trying to destroy? I suppose that if it were something like a tank or chopper or somesuch you would just have used the good ol' "getdammage" ploy...so it's probably something like a building?

In that case you'd need the nearestObject command, but please be more specific before I get more specific :-D (i.e, tell us exactly what you want killed).

Thanks.

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"