#garbage system vehicle raidus
1 messages · Page 1 of 1 (latest)
Are you sure no other mods are overriding it? Because that should work fine there.
In the diag menu under Systems → Systems diag toggle it to at least basic and in the systems diag window that shows up go to PostFrame and check the GarbageSystem type.
then you can test it in workbench
Thanks ill have to test this after work tonight! AFAIK Im not runnign any other mod that would touch the collector. My suspicion is that it's not performing the player check as it worked fine when the time was longer and "Only Destroyed" was checked.
wait maybe Im blind... Im not seeing any sort of Diag or Systems menus in workbench or world editor. Do I have to do something to see those menus?
that is the menu you open with win+alt
oh ok wow! Never even knew that existed, thanks!
Very useful menu !
just getting around to testing this out, I get into a vehicle and then get out, and as soon as I get out, the entity is tracked and the timer starts counting down with me right next to the vehicle. Its gone 150 seconds now and it hasn't refreshed the timer yet (lifetime set to 300). 🤷♂️
seems like only getting into the vehicle actually resets the timer. It seems like the player check is either not happening or broken.
trying to find a player check in the scripts but all I found is an example of where I could add my own check for players and how to prevent insertion. ```c
/*
React to or change the behavior of the garbage insertion.
\param ent Entity instance to check logic for.
\param lifetime Original lifetime the insertion was requested with.
\return Returns a lifetime >0 for insertion and <= 0 to prevent it.
Example override to use in modded classes:
@code
override protected float OnInsertRequested(IEntity entity, float lifetime)
{
if (someCondition)
return -1; // Prevent insertion by returning negative values
if (someOtherCondition)
return lifetime * 0.5; // Cut lifetime in half based on specific needs.
return lifetime; // Return unmodified value
}
@endcode
*/
...near the end of ```c
class GarbageSystem: GameSystem
suppose i should attempt it in ```c
class SCR_GarbageSystem : GarbageSystem {
override protected float OnInsertRequested(IEntity entity, float lifetime)
The player check will happen once the lifetime expires. The config as it set to reset to 1%. So about 6 seconds it will refresh the lifetime
You can set it to 50% also then it will keep refreshing at 300.
The entire logic is in the game code not script
looks like if i want it to refresh to 300 i need to set the percentage to 100. No wonder it was still being deleted set to 1.
My iterations were set to a value too large as well so it may have been getting refreshed to like 3 sec but was still getting deleted because it was only checking every 15 seconds.
the vanilla setup is made so it basically pauses the lifetime while a player is near but just if it would otherwise be deleted. if you stand next to a vehicle but do nothing the lifetime will go down 99%. if you then enter and drive away its fine, but if you finally leave we will send the vehicle into the void
The update period does not matter. even if the interval is large or very small, the processing only happens during that, it will not delete a vehicle even if the lifetime is expired until the processing happens next. if at that time you are standing next to it it will remain on 1%
what is you actual goal you want to achieve?
Setting the refresh percentage to 100 solved my issue, now it refreshes to 300sec every interval until the player is out of range.
I mean yes, but it will mean vehicles will be around for very long, somewhat defeating the purpose of collecting abandoned vehicles