FallingSheep
OpenDayZ Lord!
Sadly it is, atleast thats what i read out of the code. I played for like 40 minutes probably and ran through 3 towns/valleys and there were no signs of zeds i was also staying for some time to maybe check if it just spawns slower or whatever but no zed ever spawned, just ones from the horde script.
Well the code does not clarify what is being spawned/despawned it just says "clean up zombies" or something like that which means all zombies that are existing on the map currently. And the other part of it spawns zombie hordes at random locations which are also configurable (coords).
I would do it myself but im too lazy to get into it, im just a newbie trying to learn programming.
yer i checked thru the code and the clean up should only clean the added zombies not any existing ones as it clears the array that the new ones are added to.
how ever you are right in that it clears ALL zombies (tested spawning zeds near a horde and for running cleanup, all zeds go
im looking into remaking the script with the below features
- a set amount of hordes that stay on the map until all killed
- hordes roam on a set/random path from town to town
- configurable amount of zeds in horde
- some other stuff (walking, health, etc)
![]()
How do I fix this error?
not sure were that error is coming from as hunger.c has no reference to Thirst?
Code:
modded class Hunger
{
bool m_NoHunger;
override void OnTick(PlayerBase player, float deltaT)
{
if(m_NoHunger)
{
//do nothing
}
else
{
player.GetMovementState(m_MovementState);
float energy = player.GetStatEnergy().Get();
float metabolic_speed = MiscGameplayFunctions.GetEnergyMetabolicSpeed(m_MovementState.m_iMovement);
//PrintString(metabolic_speed.ToString());
float energy_delta = Math.AbsInt(player.GetStatEnergy().Get() - m_LastEnergyLevel);
if (energy < m_LastEnergyLevel) energy_delta = -energy_delta;
m_LastEnergyLevel = player.GetStatEnergy().Get();
player.GetStatEnergy().Add( -metabolic_speed * deltaT );
if ( energy <= PlayerConstants.LOW_ENERGY_TRESHOLD )
{
player.AddHealth("GlobalHealth", "Health", -PlayerConstants.LOW_ENERGY_DAMAGE_PER_SEC * deltaT );
}
}
}
}