Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:16 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.