Graal Forums  

Go Back   Graal Forums > Development Forums > Tech Support
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-12-2011, 05:56 PM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
findnpcbyid(); Bug

It seems to be the case with both the V5 and V6 client that findnpcbyid(); is not working upon, or within a split second of entering or re-entering a level.

Lets say I have multiple NPCs containing:

PHP Code:
//#CLIENTSIDE
function onCreated(){
  if(!(
this.id in this.level.items)){
    
this.level.items.add(this.id);
  }

And within another NPC I have:

PHP Code:
function onPlayerTouchsMe(){
  for(
temp.this.level.items){
    
temp.findnpcbyid(temp.i);
    
this.doSomething(temp.n);
  }

If I were to somehow touch this NPC within a slight moment of re-entering the level, findnpcbyid(); fails to return the npc object. I'm pretty sure the problem is with findnpcbyid(); as all the id values within the array are fine.

Could this possibly be fixed within the new client?
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:29 AM.


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