Ok heres the entire script:
_obj = _this select 0
_man = _this select 1
_index = _this select 2
;Only the player is allowed to place mines
if (_obj != _man) then {hint"Only the player can place a mine";exit}
;But not if he is in a vehicle (exception is car bomb)
if (vehicle _man != _man) then {hint"Not while you are in a vehicle";exit}
;and only if he still has mines left
if ((count giMines) < 1) then {hint"You have no more GI Mines left";exit}
#PlaceMine
_mine = giMines select 0
_distance = 1.25
giMines = giMines - [_mine]
if ((count giMines) > 0) then {goto"skip"}
_obj removeAction _index
;if ((count apMines) < 1) then {_obj removeAction countMineAction;8 setRadioMsg "NULL";9 setRadioMsg "NULL";MinesOn = nil}
#skip
_minePos = [(getPos _man select 0) + _distance * sin(getDir _man),(getPos _man select 1) + _distance * cos(getDir _man),0]
_man switchmove "CombatToPutDown"
titletext ["Planting Mine","PLAIN DOWN"]
~0.5
titletext ["Planting Mine","PLAIN DOWN"]
~0.5
titletext ["Planting Mine","PLAIN DOWN"]
~0.5
titletext ["Mine Planted","PLAIN DOWN"]
~0.5
gimines=gimines-1
hint format ["You have %1 AV Mines left!", gimines]
;player switchmove"HandGunStandToHandGunTakeFlag"
_case = "bomb" createVehicle [0,0,0]
_case setPos [_minePos select 0,_minePos select 1,-0.35]
~0.75
~ ArmDelay - 1 + random 2
_mine setPos _minePos
_case addAction["Disarm mine","DisarmMine.sqs"]
exit
This script basically allows the player to place mines (not the ones u get in ur gear section). I tried what u said krieg but it didnt work. The 'gimines' are the triggers that have the camcreated shells in e.g. heat125. The amount of 'gimines' are defined in the init.sqs like gimines=9.
Are there any obvious probs with this script?
Thx for ur help so far
Gruntage