• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Create damaged loot ingame

Newbie Spellweaver
Joined
Nov 29, 2014
Messages
40
Reaction score
8
Hello everybody,
I've solved the problem about adding new addons, one day I'll make an explanation.
Now I come here with another question:

What should I modify in order to spawn at the very start of the mission, DAMAGED LOOT?
 
Newbie Spellweaver
Joined
Dec 10, 2014
Messages
21
Reaction score
0
Hello everybody,
I've solved the problem about adding new addons, one day I'll make an explanation.
Now I come here with another question:

What should I modify in order to spawn at the very start of the mission, DAMAGED LOOT?

Hey man :) I had same problem and i solved it :) Here you got my server file :) Past it to addons folder :) Damaged loot should start spawn when you do it :) But make backup of your file to set it back if something won't work :)
 
Newbie Spellweaver
Joined
Nov 29, 2014
Messages
40
Reaction score
8
To spawn rotten fruits also, you need to edit the server_data.pbo
open config.bin and you will see the cfgSpawns class with all the cities and what got spowned there. add the rotten fruits classes!
 
Newbie Spellweaver
Joined
May 17, 2014
Messages
62
Reaction score
9
Cycle can change the state of fruit on the entire map. And when the state ruined to remove the object and create a rotten fruit.
 
Newbie Spellweaver
Joined
May 17, 2014
Messages
62
Reaction score
9
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.
 
Newbie Spellweaver
Joined
Nov 29, 2014
Messages
40
Reaction score
8
eheheheh that's good, it's more a challenge than anything :D
Thank you
We can add a switch true do to check the type of ruined fruit for example

BTW, about damage of object...
I opened server_data.pbo and I edited the FillCanister in CfgObjectActions.
In the condition, I added:
damage _inHands < 0.7 && quantity _inHands < 1 && _inHands isKindOf 'Part_CanisterGasoline' && quantity this > 1
But it seems that it doesn't recognize the quantity of gasoline in the fuelstation (which is 50.000 as declared in structure_houses config.cpp)
Any help about that?
 
Newbie Spellweaver
Joined
Nov 29, 2014
Messages
40
Reaction score
8
I've modified thi script because, as you said it was very slow, and I'm using init eventhandler inside the config.cpp of gear_food.pbo :)
Thank you
 
Back
Top