Welcome!

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!

DeSpawn syste

Elite Diviner
Joined
May 26, 2014
Messages
482
Reaction score
32
Hey help me to think.

First i have the NPC System working around me, i explain, I made a radius around me and if the NPC is in the radius around me, spawn, and is outside of the radius despawn.

Now i was thinking in this.

CalculateRadius and vSpawnNpc get the x y z. And my position and get it true is it is inside the circle.

if (CalculateRadius(vSpawnNpc))
{
GU_OBJECT_CREATE
NPC
}


Now for DeSpawn i was thinking in this

if (CalculateRadius(vSpawnNpc))
{
// code
}
else
{
GU_OBJECT_DESTROY
}.

PD: For the optimize the code, i don't do the for everytime, i only have one thing with all include.
 
Back
Top