Hello,
I made a mission that I called "Hunger Games".
Can you spawn food in regular ArmA 2 or OA? I have searched for
scripts on google but the classnames only seems to work on DayZ.
I opened the DayZ singleplayer editor and spawned "foodcanpasta" and
then saved it as multiplayer mission. But you can't right click it
and choose eat. I also want the food to be in for example an ammo
crate, so the players have to find the food to survive.
I have a script that makes your character take damage when the hunger
is over 10. That's why I need food.
Eat:
if (not((_this select 1)==player)) exitwith {}; //this checks if the
player has activated this actionentry. Otherwise a player will be
able to command the AI to eat for him^^
hunger=hunger-5;if (hunger<0) then {hunger=0;};
Hunger:
player hasweapon "blah";player hasmagazine "blah";if(not((_this select
0)==player) exitwith {}; //this is for checking if unit is player,
this makes the loop local on a client
hunger=0;
while {alive player} do {
hunger=hunger+1;
if (hunger>10) then {player setdammage (getdammage player) +
hunger/100;};sleep 10;};
Is there a better script? I also want to see how much hunger you have left, like a hud.
I hope someone can help me :)