here's my first script release for Arma2.
Its a pipe-bomb drop script. Useful if you want to command AI-members of your group to blow up something without bothering around with "move to" and "drop-action" commands...
How it works:
Unit moves to 1st drop location and becomes careless if distance < 4 meters. When unit reaches the spot ( < 2 Meters distance) it drops one satchel and moves to the next bomb location (if given). Behaviour automatically restores to previous state until unit is near next spot and so on.
If all drops are done, unit moves to "retreatPos" and waits for the command.
FuncUnitDropPipeBomb = compile preprocessFile "unitDropPipeBombV2.sqf";
DropHandle_X = ([Unit, [pos1ToDrop, Pos2ToDrop, ...], positionToRetreat] spawn FuncUnitDropPipeBomb);
0: Type Unit
1: Array of Objects (Tank, Car, Helicopter, Invisible H)... (I prefer the 'invisible H')!
2: Retreat point (Not a position!)
RS_DPB_TOUCHOFF_unitname WRITE set to true somewhere to let unit touchoff _ALL_ laid bombs.
RS_DPB_ERROR_unitname READ becomes true if something went wrong.
RS_DPB_BOMBS_DROPPED_unitname READ becomes true if all bombs are placed.
RS_DPB_BOMB_DROP_COUNT_unitname READ number of satchels already planted by unit.
Example: If unit is named "SpecOp1" the touchoff var will be "RS_DPB_TOUCHOFF_SpecOp1".
Global Variables become resetted to 0 or false when script is restarted on same unit. Script must not be called
again if not finished!
The script comes with a demo mission.
Download link: Download link from UPLOADED.TO
Feel free to leave comments or suggestions.
Added 17 hours 15 minutes later:
New version 2.1.6
V 2.1.5 changes: NEW optional Debug-Param
Bugfix -> moveToCompleted not working
Bugfix -> missing "_error" check for satchel counting
V 2.1.6 changes: Magically move pipebomb to exact desired location
V2.1.6 download from yourfiles.to