Death cross script ??

ok so the cross appears but the problem is that there wont spawn the mags food and backpack on the ground, weapons are ok but the rest isnt there.

any ideas?

// Create the tombstone objects.
_graveBase = createVehicle ["GraveCross2", position _body, [], 0, "NO_COLLIDE"];
_graveBase setPosATL position _body; // setPos again because arma.
_graveBase setDir _playerDir;

// Create a loot container inside the grave.
_tempContainer = createVehicle ["weaponHolder", getPosATL _graveBase, [], 0, "can_collide"];
_containerLoc = getPosATL _tempContainer;
_containerLoc = [((_containerLoc select 0) + 0),((_containerLoc select 1) + 0),0];
_tempContainer setPosATL _containerLoc;

// Add the weapons that were on the player to the new weapon container.
{
_tempContainer addWeaponCargoGlobal [_x,1];
} forEach _playerWeapons;

// Add the magazines that were on the player to the new weapon container.
{
_currMagazine = _x select 0;
_currMagAmmoCount = _x select 1;

// TODO: Figure out how to use this once the magazine is inside the cargo container...
_currMagCapacity = (getNumber(configFile >> "CfgMagazines" >> _currMagazine >> "count"));
_newAmmoAmount = _currMagAmmoCount / _currMagCapacity;

_tempContainer addMagazineCargoGlobal [_currMagazine,1];
} forEach _magazineArray;
 
You need to add them to the code that you're using, since Wasteland doesn't have any consumables and backpacks (the 404 version i guess :confused: )
Code:
_magazines    = call player_countmagazines;
_secweapon    = secondaryWeapon player;
_backpack      = unitBackpack player;
etc.
A good example how to do this would be the player_switchModel.sqf code.
 
This isn't going to just plug into Epoch code without some working on.. your _magazineArray isn't even declared anywhere, so the forEach loop is not going to do anything, every '_x' references each item in the looped array, that isn't declared.

Try: https://community.bistudio.com/wiki/magazines and apply the player magazine array to the empty array _magazineArray. Don't get too concerned with the vehicle reference, everything in Arma is a 'vehicle' of sorts, think of it not as a 4 wheeled vehicle but a vehicle in it's true sense..
 
ok now the mags, consumables medics are spawning thx to axeman and cyrq, but the backpack and the loot which is inside the backpack wont spawn there..
 
Backpacks are tricky. Look on the epoch forum for my custom loadout script. Even with that the backpack ends up on the ground
 
I would rather make it so when you select hide body, it turns into a cross (loot gone). So when the player that was killed returned he will definitely see someone looted and buried you :)
 
http://pastebin.com/TuMYRnJ4

this is the script we are using now, everything works fine, but the thing with the backpack is really tricky, we set a manually backpack there so the loot is droping out of it but the backpack of the player still wont spawn.

// #### BACKPACK to weaponsholder start ####

_backp = createVehicle ["DZ_CivilBackpack_EP1", position _body, [], 4, "can_collide"];
_backp setPosATL position _body; // setPos again because arma.
_backp setDir _playerDir;

// #### BACKPACK to weaponsholder stop ####
 
Im currently using that grave cross script, but i want the loot to spill on the ground instead of in a medical box, and since im using epoch with base building 1.2 the grave is actually a booby trap so i've removed the grave and just have the Cross with the helmet
 
ok i have problems ;) its ok the next update come after new install from my windows root.

i change this f**** windows server.
ok see you later

Feindflug :)
 
Back
Top