Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   -Help - if(created) if(created) if(created) ect... ??? (https://forums.graalonline.com/forums/showthread.php?t=56011)

Taharu 11-12-2004 09:10 AM

-Help - if(created) if(created) if(created) ect... ???
 
From TB3 - On Maloria
Im having problems with the spawning system I have made, and I have found the problem.
This is what happens.
The levels get filled with too many spawns.
More Details
More baddies are spawned that are supposed to be.
There is a limit in each level.

An npc in the level spawns the baddies they are putnpc2 baddies.
Levelnpc = spawns
DB Npc = baddy

The level npc sets its number of spawns out to 0 when (created). and the number decreases when a baddy is killed.
Baddies are spawned on (playerenters) and count goes up

Everything works perfectly until here.

After a certain period of time all level npcs magicaly
dissapear from the level but only when no players have been in it a while.

Im guessing this is some server lag preventer I dont know.

When a player enters the level again if ( created) is called again the variable is set to 0 again and more baddies are spawned.

I can script a way around this of course , but i shouldnt have to. When an npc is created it shouldnt be re-created. How does this get
fixed and is it just our server?
I checked with variable dump and all level npcs are removed when no players have been in the level for a while. DB npcs are just
fine though.

So my question is what do i do?? O_o

xAndrewx 11-12-2004 09:30 AM

Hey taharu <3,Try posting in the NPC Section, I don't think it will be answerd here..

Darlene159 11-12-2004 01:37 PM

Moved to the appropriate forum

Admins 11-17-2004 12:59 AM

Local npcs are removed after some time, so that the level are not wasting memory / resources if there are not players or active npcs in them,
but putnpc2 stay there.


All times are GMT +2. The time now is 01:42 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.