Thread: onwater()
View Single Post
  #4  
Old 06-04-2010, 11:13 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Move is a preexisting function :P Try renaming it.

Also, you can just do something like this:
PHP Code:
function MoveFish() {
  if (!
onwater(this.x+1.5,this.y+2)) return;
  
this.return = int(random(0,50));
  if(
this.return > 45) {
    
// stuff
  
}

'return' will stop the function immediately.

Also, it may be a problem with some sort of level thing... I doubt it, but try something like:
this.level.onwater(x,y);
Reply With Quote