Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #31  
Old 12-20-2006, 10:00 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by Andy0687 View Post
Rambling


I don't know what his intentions were, but he put it off as a challenge. Sort of like seeing if people know how to do something, without doing it the way he's done it.

That's the only reason I responded the way I did, else, I'd be glad to help.
Reply With Quote
  #32  
Old 12-20-2006, 11:49 PM
_Z3phyr_ _Z3phyr_ is offline
Banned
Join Date: Sep 2003
Location: Louisiane
Posts: 390
_Z3phyr_ is an unknown quantity at this point
This stuff
PHP Code:
function onTimeout() {
  for (
i=0;i<=2;i++) {
    
player.x+=i;
  }
  
this.setTimer(.5);

only moves me by whatever i is set to (in this case 0 tiles), so it doesn't work (I said it because it doesn't work -- as a tip that its not the right answer).

And how about an answer in GS2? English doesn't really help me.
Reply With Quote
  #33  
Old 12-28-2006, 04:00 PM
godofwarares godofwarares is offline
Webmaster
godofwarares's Avatar
Join Date: Dec 2006
Location: Florida
Posts: 552
godofwarares is on a distinguished road
Send a message via ICQ to godofwarares Send a message via AIM to godofwarares Send a message via MSN to godofwarares Send a message via Yahoo to godofwarares
Quote:
Originally Posted by _Z3phyr_ View Post
*shrug* anyway instead of making a new thread how about I pose another question?

How does...
PHP Code:
if (playerleaves) { 
... translate into GS2?

I know it ain't
PHP Code:
function onPlayerleaves() { 
so what is it?!
Since GS2 is function onEVENTNAME(params) {

It would be

PHP Code:
function onPlayerLeaves() {
// ...

Quote:
Originally Posted by _Z3phyr_ View Post
I know it ain't
PHP Code:
function onPlayerleaves() { 
It has to be :P
Playerleaves is an event, and read above :P
Reply With Quote
  #34  
Old 01-08-2007, 09:59 PM
godofwarares godofwarares is offline
Webmaster
godofwarares's Avatar
Join Date: Dec 2006
Location: Florida
Posts: 552
godofwarares is on a distinguished road
Send a message via ICQ to godofwarares Send a message via AIM to godofwarares Send a message via MSN to godofwarares Send a message via Yahoo to godofwarares
Quote:
Originally Posted by _Z3phyr_ View Post
This stuff
PHP Code:
function onTimeout() {
  for (
i=0;i<=2;i++) {
    
player.x+=i;
  }
  
this.setTimer(.5);

only moves me by whatever i is set to (in this case 0 tiles), so it doesn't work (I said it because it doesn't work -- as a tip that its not the right answer).

And how about an answer in GS2? English doesn't really help me.
Why not just do a for loop that increses the player's X position?

Example:

PHP Code:
function onPlayerTouchsMe()
{

  for ( 
0<= 2i++ )
  {

    
player.x++;

  }


Makes much more sense
Reply With Quote
Reply


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 10:56 PM.


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