View Single Post
  #1  
Old 08-15-2013, 05:23 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Change tile from a different level

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".
__________________
Deep into the Darkness peering...
Reply With Quote