View Single Post
  #1  
Old 01-24-2005, 12:39 AM
TB3 TB3 is offline
Registered User
TB3's Avatar
Join Date: May 2001
Location: US of A State of VA
Posts: 658
TB3 is on a distinguished road
Send a message via Yahoo to TB3
with(npcs[npcscount-1]) Priority ?

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 (createdsendtonc 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?
__________________

To the sun of your age, I arise
Reply With Quote