View Single Post
  #6  
Old 09-07-2013, 01:43 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
ahhh so you use findimg per the sprite id. Didn't know you could do that.


So my last issue is it seems its doing both if commands in rollImg and it shouldn't be. I'm passing the player.dir through in PARAM3, and in echo before it sets the ani it's correct and only sends once, but when you are dir 2 or 3 it still does 0 and 1 for some reason. If you are 0 and 1 dir, then it only does dir 1 and 2. I can't figure out for the life of me why it's doing 0/1 when the dir is 2 or 3.

PHP Code:
SCRIPT
function onPlayerEnters()
{

  
play(params[1]);

  
this.moveway params[2];
  
rollImg();

}

function 
rollImg() {
echo(
"made it");
  if (
this.moveway <= 1) {
echo(
"left up");
    for (
findImg(1).rotation 0findImg(1).rotation > (-(pi)); findImg(1).rotation -= (pi 4);)

      
sleep(0.05);
  }
  if (
this.moveway >= 2) {
echo(
"down right1");
    for (
findImg(1).rotation 0findImg(1).rotation < (pi); findImg(1).rotation += (pi 4);)

      
sleep(0.05);
  }
}
SCRIPTEND 
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...



Last edited by sssssssssss; 09-07-2013 at 02:58 PM..
Reply With Quote