Stash Boobytrap

I cannot figure this out and am really tired right now. Incase anyone wants to work on them :

https://www.dropbox.com/s/j1ro5v896teyxx1/boobytrap.sqf (this is where the issues are)

https://www.dropbox.com/s/hjs5k8agzuf9t79/fn_selfActions.sqf (the addaction and such for boobytrap.sqf is all the way at the bottom.)

Good luck, if no one decides to work on this through the night, i'll start up on it again tomorrow or this weekend. For reference : http://opendayz.net/threads/release-freds-zombie-bait-wip.10701/ (its the code I modified for this, the only thing I can't get to work is the damn explosion and the kill)


As rossymond suggested this should show you all you need for explosions.

https://raw.github.com/Daimyo21/Bas...ld/dayz_code/external/dy_work/player_bomb.sqf
 
Started off looking at Fred's code again, found that I wasn't letting it look for a player within the vicinity so changed _setBomb to
Code:
_setBomb = {isPlayer _x} count ((getPosATL _bomb) nearEntities [["AllVehicles","CAManBase"],10]);
have yet to test or anything but will get back to you

Didnt work lol
 
So Matt and I have made some progress on the script we just can't get it to blow up. I have added some safe guards so the person that plants the bomb is protected when entering the detection radius (5 meters)

Her is our code as follows
Code:
player playActionNow "Medic";
sleep 1;
titleText ["You have placed a Booby Trap","PLAIN DOWN"]; titleFadeOut 5;
 
_mypos = getposATL player;
_dir = getdir player;
_mypos = [(_mypos select 0)+2*sin(_dir),(_mypos select 1)+2*cos(_dir), (_mypos select 2)];
_createBomb = createVehicle ["StashSmall", _mypos, [], 0, "CAN_COLLIDE"];
_createBomb setDir _dir;
_createBomb setposATL _mypos;
_safety = setVariable planter; 
sleep 1;
 
if (player getVariable _safety) then {
        planter = true;
} else {
planter = false;
};
while {planter = false} do 
{
waituntil {((player distance StashSmall)<=5);};
createVehicle "HandGrenade_West" (position [_dir,_mypos];
cutText ["Boom!","PLAIN DOWN"]; titleFadeOut 5;
deleteVehicle _createBomb
};
Has been upated
 
If we could get the trigger perfect we could technically run daimyo's bomb as a secondary script called here
Code:
_trg setTriggerStatements["_trapBomb", "Boom!", ""];
 
where _trapBomb 's paramaters would be changed to Secondarybomb.sqf
 
add action -gear on mouse wheel, action runs the .sqf

.sqf that spawns a live grenade

is the easiest approach i guess. or u cud use an IED/satchel charge if they are still allowed on cherno
 
add action -gear on mouse wheel, action runs the .sqf

.sqf that spawns a live grenade

is the easiest approach i guess. or u cud use an IED/satchel charge if they are still allowed on cherno

That's the exact approach I took. The issue was actually getting the grenade to spawn. I tried different exsplosives and different methods and scoured with BI wiki for hours to no avail
 
Back
Top