Forum Jump :

Author Message

Posts: 113

Level: Member

Country: us
In-game name:

#1 Posted at 2020-02-23 19:06        
I can place a backpack on the ground and add this to it's init to place a random number of magazines into it:

this  addmagazinecargo ["magazineName", floor(random 6)]; 
It will add 0-6 magazines.

How do I do that in a unit's init for the backpack they are wearing? I can't even get addItemToBackpack to work at all based on the exact syntax examples in the wiki:
this addItemToBackpack "magazineName";
The wiki says the item can be a magazine. Nothing happens when I try that. Ultimately I need to have the random code in there anyway.