OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: gadolinite on 16 Jan 2006, 06:13:01
-
How do you get the AI to place a satchel charge?
-
Satchels and mines are placed by "firing" the "put" weapon. I'd have to double-check, but I'm pretty sure it goes like this:
soldier fire "put"
This assumes the soldier only has satchels, not mines.
To get them to touch off the bomb, you need to use the "action" command. See the reference in the ed depot. An alternative is to give the AI "timebomb" magazines, which automatically blows up after 30 seconds (instead of "pipebomb"-- the normal satchel charge).
-
Hello Great General Barron, i was just looking at that, theres a way to set timer to some how too
unitname fire ["put","pipebomb"]
-
Unitname action ["put","pipebomb"] or UnitName fire ["put","pipebomb"]
then
unitname action ["touchoff"]
Should do the job.
:)
-
MrN i think put and "fire" sets it on 30 then, action leaves it open for the "touchoff" , is that correct ?
-
MrN i think put and "fire" sets it on 30 then, action leaves it open for the "touchoff" , is that correct ?
Don't think so, no.
I've just had a play around with this and as always it's a little more complicated than I thought. :)
I couldn't get action to work at all.
The best result seems to be:
UnitName fire ["put","pipebomb"]
then
unitname action ["touchoff"]
Or
UnitName fire ["put","pipebomb"]
followed by
UnitName action ["settimer"]
When the unit is near the bomb he placed.
Or
UnitName fire ["put","timebomb"]
for a timed explosive.
Note that you need to make sure timebomb is in the inventory for the unit to place it.
I've attached a little demo with the different combinations I tried.
-
ok Great , give her a look ,,,, i'll save the camands from it thanks, cheers yank.
EDIT yes after reveiwing the demo,,,,,, yes it rehatches lots,,,, radio alpha,, very good ,, thanks ;)
-
Word of advice to those doing this in the future,.. For god sake! dont be a Tart like me and make the Soldier that places the charge; drive to the otherside of the island and expect UnitName action ["TOUCHOFF"] to work (stupid me not realising BIS actually made OpF realistic and took the strength of radio signlas into account). I did this and was racking my brain wondering why the hell my soldier wasn't doing his job properly.
I reccomend your soldier to keep within good viewing distance of the object you're blowing up... ;D