Home   Help Search Login Register  

Author Topic: Creating bombs; deleting units  (Read 1124 times)

0 Members and 1 Guest are viewing this topic.

Sakato

  • Guest
Creating bombs; deleting units
« on: 06 Sep 2002, 22:35:20 »
Hy guys, here's Sakato in search of hints again...

I need to put some pipebombs on the map, which are supposed to explode in a certain time; and I need to make my man able to deactivate them... Some ideas on how to make this all?


Another question: wich command should I use to delete once and for all an unit or an object?


And what's the command for making a certain man wear sunglasses?  8)

DeusRich

  • Guest
Re:Creating bombs; deleting units
« Reply #1 on: 07 Sep 2002, 12:39:29 »

Gameer_77

  • Guest
Re:Creating bombs; deleting units
« Reply #2 on: 07 Sep 2002, 12:43:51 »
To delete Vehicles/units:

deleteVehicle tank (version 1.34 and higher required)

 8)PEACE

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Creating bombs; deleting units
« Reply #3 on: 07 Sep 2002, 18:06:04 »
Put a marker where you want each bomb, and name the markers.    In init.sqs put something like

pipebomb_1 = "pipebomb" camCreate getmarkerpos "marker1_0"

Create a trigger for each bomb:  in the activation field put something like

pipebomb1 setdammage 1

and use the countdown fields as a timer so that it goes off at the right time.    If you want the counter to start at the beginning of the mission put

true

in the activation field.   I haven't tested this, so its not guaranteed.  If it doesn't work the official and unofficial command guides should help.

As for deactivation, I don't know .... I know you can use actions to make a dude set them off, maybe there is a deactivation action ... though dunno whether that would override the setdammage command, I doubt it.   What might work would be to have a little script that deletes the pipebomb and then replaces it with a new one.  The new one would have different name so the trigger would not affect it.

Alternatively, use a variable in the activation field of the trigger:   if explode=false (say) then the trigger won't fire and your bomb is "deactivated".    You could make it so that if your guy gets within 1 metre then the bomb is deactivated.   I think the command is "distance".

That's not very clear so I'll say it again.   If the bomb is supposed to go off 5 minutes after the mission starts unless the guy gets to it then your triggers look like this

init.sqs
  explode=true

trigger 1
  condition:     true
  countdown:  min=max=mid=300
  activation:    timer=true

trigger 2
  condition: pipebomb1 distance player <=1  (check the syntax)
  activation:  explode=false

trigger 3
   condition:  timer and explode
   activation: pipebomb_1 setdammage 1

Hope that helps.
« Last Edit: 07 Sep 2002, 18:08:32 by macguba »
Plenty of reviewed ArmA missions for you to play