View Single Post
  #2  
Old 08-15-2013, 06:50 AM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Quote:
Originally Posted by Angel_Light View Post
How can one change the tiles that a player currently is not in? I have a custom sword script and after cutting a bush I use scheduleEvent to eventually regrow the bush after awhile with all the data needed passed through the params.

snippet :
PHP Code:
for ( temp.c = 0; temp.c < 4; temp.c ++;) 
      
findLevel( temp.lvl).tilelayers[ temp.layer].tiles[ temp.tX + temp.c % 2, temp.tY + int( temp.c / 2)] = this.( @ temp.sag)[ temp.typ][ 1][ temp.c];
  
    
putleaps( temp.ltp, temp.tX, temp.tY);                  
    
findLevel( temp.lvl).tilelayers[ temp.layer].updateboard( temp.tX, temp.tY, 2, 2); 
if I stay on the level/gmap is works perfectly, if I go inside a house and the event is called while I'm inside, the tiles don't update and the bush doesn't "regrow".
Track any changes made through a variable and if a change has been made prior to the player entering the level, then do updateBoard from an NPC in that level?
__________________
Reply With Quote