View Single Post
  #5  
Old 05-03-2010, 11:37 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Quote:
Originally Posted by WhiteDragon View Post
I'd guess that it's harder to read because you aren't used to it.

Maybe this will motivate it a little... rewrite the example I gave in the way you'd usually do yourself.
HTML Code:
function onCreated() {
  this.ball = showimg();
  
  this.onMoveBall(0.05, 5);
}

function onMoveBall(timer, count) {
  this.ball.x += 5;

  if (temp.count > 0) {    
    scheduleevent(temp.timer, "MoveBall", temp.timer, (temp.count - 1));
  }
}
I understand you've got a function which means you don't need to keep repeating the same script, (which is good, don't get me wrong) but when a new scripter comes on to the server they won't understand that script.

I wouldn't use your script, as for me it just makes GScript more complicated than what it should be.
Sorry (it is good, but why not just do the loop inside the weapon using functions people can read!)
__________________
Reply With Quote