Most visitors online was 17251 , on 24 May 2024
Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!
Join Today!private ["_damage","_posFruit"];
while {true} do
{
_arrayFruit = nearestObjects [[7500,7500], "Fruit_AppleFresh",15000];
{
_damage = damage _x;
_posFruit = position _x;
if (_damage <1) then
{
_damage = ((_damage + 0.1) min 1);
_x setDamage(_damage);
};
if (_damage > 0.99) then
{
deleteVehicle _x;
_newRotten = createVehicle ["Fruit_AppleRotten",_posFruit, [], 0, "CAN_COLLIDE"];
_newRotten setDamage (random 1);
};
}forEach _arrayFruit;
sleep (60*15); //15 Minute
};
Code:private ["_damage","_posFruit"]; while {true} do { _arrayFruit = nearestObjects [[7500,7500], "Fruit_AppleFresh",15000]; { _damage = damage _x; _posFruit = position _x; if (_damage <1) then { _damage = ((_damage + 0.1) min 1); _x setDamage(_damage); }; if (_damage > 0.99) then { deleteVehicle _x; _newRotten = createVehicle ["Fruit_AppleRotten",_posFruit, [], 0, "CAN_COLLIDE"]; _newRotten setDamage (random 1); }; }forEach _arrayFruit; sleep (60*15); //15 Minute };
This is a very simple example. It has a lot of shortcomings, and it will be very slow, but who can be able to change it for themselves.
I do not give a ready-made solution, but I give a trail of bread crumbs.