Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 12-22-2009, 05:48 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
I'm not sure if move() updated the x and y continually or only when it reaches the end, but you could do like:

PHP Code:
function whatever() {
  
this.move(52100); // delta x, delta y, time, options

If you wanted to call a function when it reached an x of 7, you would just schedule the event for when the x would be 7

Set it up like an equation

PHP Code:
+ (5/10)(t)

+ (5/10)(t)

= (5/10)(t)


then in your function

PHP Code:
function whatever() {
  
this.move(52100); // delta x, delta y, time, options
  
this.scheduleEvent(4"onMyFunction");

(not trying to sound condescending, sorry if it comes off that way)
__________________
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 07:50 PM.


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