View Single Post
  #4  
Old 11-24-2011, 08:20 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
You don't even need a check like what you have, makes almost no sense to have it that way either. This is the gist of what you should be aiming for:

PHP Code:
function onPlayerEnters() {
  if (
players.size() == 1) {
    if (
this.rock_is_alive) {
      
setRockToFullHealth();
    }
  } 
}

function 
onRockDestroyed() {
  
// Set's Timer to Timeout in 10 Seconds
  
setTimer(10);
}

function 
onTimeout() {
  
respawnRock();
}

function 
respawnRock() {
  
// Return rock back to normal

Obviously the script won't work by just copy and pasting it in, you're going have to figure that part out on your own!
__________________
Quote:
Reply With Quote