View Full Version : Satchel Charge At Waypoint
I'm making a mission with a convoy, where the front vehicle will explode when reaching a waypoint, leading to an attack on the convoy by insurgents.
So far I've only been able to do a SetDamage 100 at a waypoint, which will explode the lead vehicle - But well, that just isnt the effect I want.
What I'm looking for is a way to make an satchel charge touch off once the lead vehicle gets in range.
Every bit of help will be appreciated.
One way would be to actually use an enemy soldier to place a satchel. This can be done rather simple with a few triggers and commands. You will need these two:
unitname Fire ["pipebombmuzzle", "pipebombmuzzle", "pipebomb"]
unitname action ["TOUCHOFF", unitname]
The other way would be to spawn some kind of explosive ammo in front of your convoi.
bomb = "GrenadeHand" createVehicle getpos this;
bomb setpos getpos this;
A grenade in this case, but any other type of ammo will also do the job.
Edit:
oh right and the third way would be to place/bury something else on that position (preferably something explosive) and use setdamage 1 on this object too.
PS.: there is no such thing as setDamage 100. ;)
0 = in perfect shape
1 = dead
One way would be to actually use an enemy soldier to place a satchel. This can be done rather simple with a few triggers and commands. You will need these two:
unitname Fire ["pipebombmuzzle", "pipebombmuzzle", "pipebomb"]
unitname action ["TOUCHOFF", unitname]
Can I use that command to have any soldier fire his weapon at the point of my choosing?
JamesF1
Jun 10 2009, 08:11
You can force a soldier to fire on a target using doFire (http://community.bistudio.com/wiki/doFire) in the form:
mySoldier doFire leadVehicle
You can make the soldier target the vehicle first using doTarget (http://community.bistudio.com/wiki/doTarget), but there's no real practical benefit. Do be aware, that a unit may not respond as desired if their behaviour is "CARELESS" (at least, that's what the Biki pages suggest).
Additionally, if you want multiple targets to engage the vehicle, simply pass an array instead of a single unit.
Personally, I far prefer to use the createVehicle method, as described by Tajin, above. I usually spawn an M136 round, or similar, at the particular location. It's far more reliable, as soldiers can often just decide to do their own thing, anyway.
The method with the actions can sometimes be interesting too. Depends on the mission and the importance of this "trap". The good thing about it is that it allows players to interfere. (e.g. some forward observator noticing an enemy soldier that buries something along the road would be able to take him out, effectively avoiding the convoi to be blown up)
JamesF1
Jun 10 2009, 08:36
Yup, very true. I guess I presumed that it was a "necessary" explosion! :) Of course, using a soldier to fire, say, a launcher round also allows for the same sort of 'dynamic' environment (provided the soldiers are not too well hidden)! Edit: a further way to make the latter situation more viable, is to add the launcher round to the unit just before commanding him to fire, that way, he has to reload before he fires... might give an alert unit the time to take him out and save the convoy.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.