Jump to content

Recommended Posts

Hey there davidoss.. I tried your script for 10 minutes and then immediately binned it.

 

In a multiplayer match, I watched a unit die, waited until it's body disappeared and while I could still see the blood stain it left on the ground, when I tried to walk forward, I was stopped by some invisible force.

 

When the blood stain disappeared I could then move over it..

 

There's something you're not deleting.

Share this post


Link to post
Share on other sites

Maybe it's just a strong wind prevents your move.

I do not implemented there anything invisible that run around with a rag and clean the floor.

Share this post


Link to post
Share on other sites

Hey there davidoss.. I tried your script for 10 minutes and then immediately binned it.

 

In a multiplayer match, I watched a unit die, waited until it's body disappeared and while I could still see the blood stain it left on the ground, when I tried to walk forward, I was stopped by some invisible force.

 

When the blood stain disappeared I could then move over it..

 

There's something you're not deleting.

 

What is he not deleting?

 

from the script:

 

{
if (isnil {_x getVariable "dnt_remove_me"}) then {
 
deleteVehicle _x;
_i = _i + 1;
};
 
} forEach allDeadMen;

Share this post


Link to post
Share on other sites

Yeah not sure what you're on about beerkan.

 

The script obviously is doing what it's supposed to (deleteVehicle ...) so you must have some other issue going on.

Share this post


Link to post
Share on other sites

Yeah not sure what you're on about beerkan.

 

The script obviously is doing what it's supposed to (deleteVehicle ...) so you must have some other issue going on.

Hey if the truth hurts.. don't shoot the messenger.

 

However I'm on dev branch so maybe that's something to do with it.

Share this post


Link to post
Share on other sites

I don't see why I should be "hurt".  I was pointing out (as did 1776) that the script iterates through allDeadMen and uses deleteVehicle.  It's very straightforward and runs like most other cleanup scripts so I don't know why you thought there were additional entities that his script should be deleting.

 

If you looked through the script before you "immediately binned it", then you would have realised that and thought maybe there was something else going on instead of calling him out on these forums..

 

I'm on DB too and didn't see the issue you describe.

Share this post


Link to post
Share on other sites

..  I'm on DB too and didn't see the issue you describe.

Thanks for your comments.. and I accept your apology.

 

 

Looking forward to davidoss's next update

Share this post


Link to post
Share on other sites

Thanks for your comments.. and I accept your apology.

 

I'm sorry I'm wasting my time talking to you is the only thing I'm sorry for.

 

Nice try, see you next Tuesday.

Share this post


Link to post
Share on other sites

Hi Davidoss loving your script so far works very well. I was wondering if it would be possible to make it so the scripts dosnt cleanup body's next to players? Because its a little bit of an issue, when you are trying to loot a body and it gets deleted before you can grab any gear from it.

Anyway thanks again for the script. Keep it up.

Share this post


Link to post
Share on other sites

Hi, this script only work on mission hosted on a server or if i host the mission over internet it must work?

Thanks

Share this post


Link to post
Share on other sites

sure, default execute only server side. If you host a mission as player host you are server too.

Share this post


Link to post
Share on other sites

Does this script perpetually run or can it be made to only run once at a time when something like radio alpha is called?

I would prefer to personally have control over when this script runs for efficiency's sake.

Share this post


Link to post
Share on other sites

Sure. Its just runs once when called.

Share this post


Link to post
Share on other sites

Hey david. Its not working anymore??

 

I use this:

[] spawn {
while {true} do {
 ["m1"] call fnc_cleanup; // m1 is a marker on the map
sleep 60;
};
};

Share this post


Link to post
Share on other sites

I do not see any reason why this should suddenly stop working.

Since last bi updates we have new commands which will make the script faster and this should be done as soon as possible.

Share this post


Link to post
Share on other sites

EDITED.

 

Got it working thanks for the amazing script :D 

Share this post


Link to post
Share on other sites

How do you call this via "addAction"?

Also do you need to make a "fnc_cleanup_2" to clear a different area?

Share this post


Link to post
Share on other sites

UPDATE

13/01/17
Version 1.2 Final
*Changed usage of BIS_fnc_inTrigger to inAreaArray command
*Set lazy evaluation for conditions
 
On 12.01.2017 at 2:56 PM, dmb_ said:

How do you call this via "addAction"?

Also do you need to make a "fnc_cleanup_2" to clear a different area?

 

1.The script should run server side, so in MP you need to remotexecute execution of this function to the server.

2.You do not need to make multiple functions, you can just call it again with different param for each location.

   To prevent any lag you could use spawn and sleep between runs.

 

1.

this addAction ["Clear area",{null = ["marker1"] remoteExecCall ["fnc_cleanup",2,false];}];// for marker
this addAction ["Clear area",{null = [trigger1] remoteExecCall ["fnc_cleanup",2,false];}];// for trigger
this addAction ["Clear area",{null = [] remoteExecCall ["fnc_cleanup",2,false];}];// for whole map

2.

if (isServer) then {

	fnc_cleanup = compileFinal preprocessFileLineNumbers "scripts\cleanup.sqf";

	[] spawn {

		while {true} do {        

			[triggername] call fnc_cleanup;
			sleep 10;
			["markername"] call fnc_cleanup;
			sleep 10;
			["markername1"] call fnc_cleanup;
			sleep 480;
		};
	};
};

 

Share this post


Link to post
Share on other sites

I'm slowly upgrading a lot of scripts in my mission and this cleanup script is working excellent for my needs. I manually call the script once when I'm done clearing a given AO and I'm off to the next.

Question: Is there any way you can add something to make it clear craters too (When planes crash)?

Thanks

 

 

 

Share this post


Link to post
Share on other sites

Hey davidoss, you are amazing bro. Keep up the good work.

 

I have just started to learn how to script lately for arma 3 in the past 2 weeks and I am still quite a noob at this. I have no idea how to implement the script on whole server even though you have placed instructions. Can I get any step by step instructions please and thank you.

Edited by BlacKnightBK
never mind, after half spending 3 hours i discovered what i needed to do is a create an init.sqf and place the call there

Share this post


Link to post
Share on other sites

 

On 1/14/2017 at 1:29 AM, davidoss said:

1.The script should run server side, so in MP you need to remotexecute execution of this function to the server.

 

Thank you for your response, the code works well.

 

Does it matter that I'm hosting a non-dedicated LAN server?

Share this post


Link to post
Share on other sites
On 16.01.2017 at 7:05 PM, BlacKnightBK said:

I have no idea how to implement the script on whole server even though you have placed instructions. Can I get any step by step instructions please and thank you.

 

6 hours ago, dmb_ said:

Does it matter that I'm hosting a non-dedicated LAN server?

 

The easiest way is to set an loop which will execute the script again and again with some suspense between.

You can use gamelogic module or just init.sqf.

First of all you need to set an rule who can execute the loop.

The script should run only by server :

if(isServer) then {};

  In hosted game/SP host/player is the server as well.

 

Next we need to compile the script into function because of multiple runs.

In this case the script will be read only once by preprocessor and stored in memory under an variable.

if (isServer) then {

fnc_cleanup = compileFinal preprocessFileLineNumbers "scripts\cleanup.sqf";

};

Make sure the "scripts\cleanup.sqf" is valid path to the script.

 

After we have this next step is setup an loop.

As long we need  suspend between script executions we should spawn the loop  for extra tread and scheduled environment.

 

if (isServer) then {

fnc_cleanup = compileFinal preprocessFileLineNumbers "scripts\cleanup.sqf";

    [] spawn {

        while {true} do {        
            
            [] call fnc_cleanup;

        sleep 500;
        };
    };
};

 

Share this post


Link to post
Share on other sites
19 hours ago, davidoss said:

 

 

The easiest way is to set an loop which will execute the script again and again with some suspense between.

You can use gamelogic module or just init.sqf.

First of all you need to set an rule who can execute the loop.

The script should run only by server :


if(isServer) then {};

  In hosted game/SP host/player is the server as well.

 

Next we need to compile the script into function because of multiple runs.

In this case the script will be read only once by preprocessor and stored in memory under an variable.


if (isServer) then {

fnc_cleanup = compileFinal preprocessFileLineNumbers "scripts\cleanup.sqf";

};

Make sure the "scripts\cleanup.sqf" is valid path to the script.

 

After we have this next step is setup an loop.

As long we need  suspend between script executions we should spawn the loop  for extra tread and scheduled environment.

 


if (isServer) then {

fnc_cleanup = compileFinal preprocessFileLineNumbers "scripts\cleanup.sqf";

    [] spawn {

        while {true} do {        
            
            [] call fnc_cleanup;

        sleep 500;
        };
    };
};

 

Thansk bro, Much appreciated.
 

Share this post


Link to post
Share on other sites

Hi @davidoss

 

Can I please check whether the script only works on a 500 second loop when deleting? Was hoping we wouldn't see something delete right in front of us because of the timer, rather than perhaps changing a possible delete at x distance from player setting instead?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×