Thread: onwater()
View Single Post
  #1  
Old 06-04-2010, 10:41 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
onwater()

So i have this script, and without onwater it works fine (I use it for birds), but when i put onwater in, the damn fish doesnt move period. :/

PHP Code:
function onCreated() {
  
setCharani("armageddon-fish_bass",NULL);
}
//#CLIENTSIDE
function onCreated() {
  
setTimer(0.05);
  
drawoverplayer();
  
dontblocklocal();
  
this.= -1;
}
function 
move() {
  
this.return = int(random(0,50));
  if(
this.return > 45) {
   if (
onwater(this.x+1.5,this.y+2)) {
     
this.dir this.dir int(random(-1,1));
     if (
this.dir 3) {
       
this.dir 0;
     }
     if (
this.dir 0) {
       
this.dir 3;
     }
     
this.this.dir;
  }
  
this.dir this.i;
  
this.+= vecx(this.i) / this.speed;
  
this.+= vecy(this.i) / this.speed;
 }

function 
onTimeout() {
  
checks();
  
move();
  
setTimer(0.05);

__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote