Ok I'm having a few problems it's a bit hard to understand / explain.
I have a spawner npc i will dumb it down as the whole code isn't needed. Here is an example..
Spawner NPC:
PHP Code:
function spawn() {
setstring this.type,Undead;
putnpc2 x,y,{
join temporary;
join baddy;
};
with(npcs[npcscount-1]) {
setstring this.type,#s(thiso.type);
setstring this.owner,Baddy;
}
}
Class baddy
PHP Code:
//Baddies script
Class temporary
PHP Code:
if (created) sendtonc Type: #s(this.type);
The problem is about 1/20 times the this.type string is blank (and other strings set in with() ). I'm guessing that maybe the if (created) either loads before the with(npcs[npcscount-1]) sets the string or that with(npcs[npcscount-1]) gets an incorrect npc?
Any help , Ideas?