Thread: getx gety?
View Single Post
  #5  
Old 06-06-2007, 09:47 PM
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
it's spelt fine in the script, Stefan, I do have the block checks in there but I have to have the this.x += temp.newx or else the baddy just keeps moving from the original positions, __-__ just figured the problem i had temp.x instead of temp.newx in the tiletype check haha, thanks guys :P

EDIT : grr... well it doesnt walk if the newx and newy are blocking but if the player walks in front and stops the baddy it still screws up. Here's a part of the script

PHP Code:
function onTimeOut() {
  
temp.rx   int(random(-55));
  
temp.ry   int(random(-55));
  
temp.rs   random(05);
  
temp.rt   random(07);
  
temp.newx this.temp.rx;
  
temp.newy this.temp.ry;

if (
tiletypetemp.newxtemp.newy] != 22 && tiletypetemp.newxtemp.newy] != 11) {
    
move(temp.rxtemp.rytemp.rs16);
    
setcharani"nir_baddy_walk"this.baddy.nickthis.baddy.hpthis.baddy.fullhpthis.baddy.aggressor);
  }

  else 
    
setTimer(temp.rt);

  
sleep(temp.rs);
  
setcharani"nir_baddy_idle"this.baddy.nickthis.baddy.hpthis.baddy.fullhpthis.baddy.aggressor);
 
  
this.+= temp.rx;
  
this.+= temp.ry;

  
setTimer(temp.rt);

__________________
Deep into the Darkness peering...
Reply With Quote