View Single Post
  #23  
Old 01-25-2005, 12:00 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Quote:
Originally Posted by TB3
with() seems to be getting an incorrect npc and setting its strings thats the only explanation that seems fit.
The perfect implementation would include getting npcscount before adding the new npc, because the level might not be in memory and adding the npc might swap in some new local npcs (accessing npcscount is one of the acitivities which is loading the level into memory). Can you try this :
NPC Code:

oldnpcscount = npcscount;
putnpc2 ...
if (npcscount>oldnpcscount) with (npcs[oldnpcsount]) { ... }


I have never had problems with the npcs[npcscount-1] yet though, so it must be a special case
Reply With Quote