Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-23-2012, 11:07 PM
Trakan Trakan is offline
It's all about cats!
Trakan's Avatar
Join Date: Sep 2010
Location: France
Posts: 64
Trakan is an unknown quantity at this point
Somersaults (dodge)

Hey! I have a little request, i'm really bad with gs2 (better with gs1) and my script is not good:
(No scripters for my project for now :/)

It's a fast-maked script, no worries x)
PHP Code:
if(key == e) {
 if(
playerdir == 3){
setani gh_gani_roulade,;
playerx += 0.1;
(
10times for 1second)
freezeplayer .5;
}
if (
playerdir == 1){
setani gh_gani_roulade,;
playerx -= 0.1;
(
10times for 1second)
freezeplayer .5;
}
if (
playerdir == 0){
setani gh_gani_roulade,;
playery -= 0.1;
(
10times for 1second)
freezeplayer .5;
}
if (
playerdir == 2){
setani gh_gani_roulade,;
playery += 0.1;
(
10times for 1second)
freezeplayer .5;
}

If anyone can re-do it better with gs2 :/
My gani is 0.35 seconds, it's better to have player += 0.2/0.1, 4times?
Reply With Quote
  #2  
Old 12-24-2012, 10:45 AM
Trakan Trakan is offline
It's all about cats!
Trakan's Avatar
Join Date: Sep 2010
Location: France
Posts: 64
Trakan is an unknown quantity at this point
I remaked my script but anyone can gs2 it?

PHP Code:
if(weaponfired) {
  if(
playerdir == 3){
    
setani gh_gani_roulade,;
    
playerx += 0.6;
    
sleep .1;
    
playerx += 0.6;
    
sleep .1;
    
playerx += 0.6;
    
sleep .1;
    
playerx += 0.6;
    
freezeplayer .5;
  }
  if (
playerdir == 1){
    
setani gh_gani_roulade,;
    
playerx -= 0.6;
    
sleep .1;
    
playerx -= 0.6;
    
sleep .1;
    
playerx -= 0.6;
    
sleep .1;
    
playerx -= 0.6;
    
freezeplayer .5;
  }
  if (
playerdir == 0){
    
setani gh_gani_roulade,;
    
playery -= 0.6;
    
sleep .1;
    
playery -= 0.6;
    
sleep .1;
    
playery -= 0.6;
    
sleep .1;
    
playery -= 0.6;
    
freezeplayer .5;
  }
  if (
playerdir == 2){
    
setani gh_gani_roulade,;
    
playery += 0.6;
    
sleep .1;
    
playery += 0.6;
    
sleep .1;
    
playery += 0.6;
    
sleep .1;
    
playery += 0.6;
    
freezeplayer .5;
  }

Reply With Quote
  #3  
Old 12-24-2012, 11:08 AM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Quote:
Originally Posted by Trakan View Post
I remaked my script but anyone can gs2 it?

PHP Code:
if(weaponfired) {
  if(
playerdir == 3){
    
setani gh_gani_roulade,;
    
playerx += 0.6;
    
sleep .1;
    
playerx += 0.6;
    
sleep .1;
    
playerx += 0.6;
    
sleep .1;
    
playerx += 0.6;
    
freezeplayer .5;
  }
  if (
playerdir == 1){
    
setani gh_gani_roulade,;
    
playerx -= 0.6;
    
sleep .1;
    
playerx -= 0.6;
    
sleep .1;
    
playerx -= 0.6;
    
sleep .1;
    
playerx -= 0.6;
    
freezeplayer .5;
  }
  if (
playerdir == 0){
    
setani gh_gani_roulade,;
    
playery -= 0.6;
    
sleep .1;
    
playery -= 0.6;
    
sleep .1;
    
playery -= 0.6;
    
sleep .1;
    
playery -= 0.6;
    
freezeplayer .5;
  }
  if (
playerdir == 2){
    
setani gh_gani_roulade,;
    
playery += 0.6;
    
sleep .1;
    
playery += 0.6;
    
sleep .1;
    
playery += 0.6;
    
sleep .1;
    
playery += 0.6;
    
freezeplayer .5;
  }

Change
PHP Code:
if (weaponfired) { 
to

PHP Code:
function onWeaponFired() { 
Then change anything with

PHP Code:
playerx
playery
playerdir 
to

PHP Code:
player.x
player
.y
player
.dir 
Then with
PHP Code:
setani
freezeplayer
sleep 
us

PHP Code:
setani()
freezeplayer()
sleep() 
That's pretty much all you gotta do to convert it from GS1 to GS2.
Reply With Quote
  #4  
Old 12-24-2012, 12:22 PM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
First off, welcome?
Secondly, GS1 won't get you far.
When I first started with Graal development I tried learning GS1 (stupidly) from the offline editor.
Try looking at this recent post by scriptless.
Go with GS2.
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #5  
Old 12-24-2012, 12:27 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Quote:
Originally Posted by Gunderak View Post
First off, welcome?
Secondly, GS1 won't get you far.
When I first started with Graal development I tried learning GS1 (stupidly) from the offline editor.
Try looking at this recent post by scriptless.
Go with GS2.
Back in 2002 when I started, all we had was GS1.. It worked, but I do like GS2 far better. I think it has opened new possibilities.
Reply With Quote
  #6  
Old 12-24-2012, 01:31 PM
Trakan Trakan is offline
It's all about cats!
Trakan's Avatar
Join Date: Sep 2010
Location: France
Posts: 64
Trakan is an unknown quantity at this point
Quote:
Originally Posted by scriptless View Post
Change
PHP Code:
if (weaponfired) { 
to

PHP Code:
function onWeaponFired() { 
Then change anything with

PHP Code:
playerx
playery
playerdir 
to

PHP Code:
player.x
player
.y
player
.dir 
Then with
PHP Code:
setani
freezeplayer
sleep 
us

PHP Code:
setani()
freezeplayer()
sleep() 
That's pretty much all you gotta do to convert it from GS1 to GS2.
Thanks , but, this
player.x += 0.1;
sleep .1;
player.x += 0.1;
sleep .1;
player.x += 0.1;
sleep .1;
player.x += 0.1;
it's really ugly
Any way to change that?

Quote:
Originally Posted by Gunderak View Post
First off, welcome?
Secondly, GS1 won't get you far.
When I first started with Graal development I tried learning GS1 (stupidly) from the offline editor.
First off, i've said "Hey!" just look.
Secondly, i was on GraalReborn because it's free, so it's gs1 only.
Next, i don't have the time now for learn gs2 and that's not my work on my principal work on my project.

And finally, did you have a way to block player from going in blocking tiles, because with this script players can go anywhere they want

Last edited by Trakan; 12-24-2012 at 02:24 PM..
Reply With Quote
  #7  
Old 12-24-2012, 03:17 PM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
I think this ends now.
Reborn is frowned upon.
Good day to you.
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #8  
Old 12-24-2012, 04:27 PM
Trakan Trakan is offline
It's all about cats!
Trakan's Avatar
Join Date: Sep 2010
Location: France
Posts: 64
Trakan is an unknown quantity at this point
Quote:
Originally Posted by Gunderak View Post
Reborn is frowned upon.
That's why i stopped and moved to GraalOnline
Reply With Quote
  #9  
Old 12-24-2012, 04:49 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
PHP Code:
sleep(.1); 
Quote:
Next, i don't have the time now for learn gs2 and that's not my work on my principal work on my project.
Then we have no more desire to help you if your to busy to learn from us.
Reply With Quote
  #10  
Old 12-24-2012, 04:59 PM
Trakan Trakan is offline
It's all about cats!
Trakan's Avatar
Join Date: Sep 2010
Location: France
Posts: 64
Trakan is an unknown quantity at this point
Quote:
Originally Posted by scriptless View Post
PHP Code:
sleep(.1); 
Then we have no more desire to help you if your to busy to learn from us.
This is not what I meant. I mean, I'm working on my project thoroughly and I think the images and animations are more important before learning to code.
Reply With Quote
  #11  
Old 12-24-2012, 05:01 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Gunderak View Post
Reborn is frowned upon.
I wonder why
Reply With Quote
  #12  
Old 12-24-2012, 05:07 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Quote:
Originally Posted by Trakan View Post
This is not what I meant. I mean, I'm working on my project thoroughly and I think the images and animations are more important before learning to code.
Learning the skills you need to succeed at a project more important then the project itself. For if you never learn, you will never succeed.
Reply With Quote
  #13  
Old 12-24-2012, 05:22 PM
Trakan Trakan is offline
It's all about cats!
Trakan's Avatar
Join Date: Sep 2010
Location: France
Posts: 64
Trakan is an unknown quantity at this point
Quote:
Originally Posted by scriptless View Post
Learning the skills you need to succeed at a project more important then the project itself. For if you never learn, you will never succeed.
I know the basics of scripting, I even do my job.
I just want to do the "base" before scripting. Like First armor, basic animations, first weapon.
After that, I'll take care of developement
You are not there to judge me on my way to work I think?
Reply With Quote
  #14  
Old 12-24-2012, 05:29 PM
BboyEatsbacon BboyEatsbacon is offline
The Bacon Man
BboyEatsbacon's Avatar
Join Date: Feb 2011
Location: United States
Posts: 60
BboyEatsbacon will become famous soon enough
Quote:
Originally Posted by Trakan View Post
Thanks , but, this
player.x += 0.1;
sleep .1;
player.x += 0.1;
sleep .1;
player.x += 0.1;
sleep .1;
player.x += 0.1;
it's really ugly
Any way to change that?
Use a for() loop to clean up this code. Repeating code is most always a bad thing, especially in one instance after another.

ex:
PHP Code:
for (temp.0temp.4temp.++) {
    
player.+= 0.1;
    
sleep(.1);

Reply With Quote
  #15  
Old 12-24-2012, 05:32 PM
Trakan Trakan is offline
It's all about cats!
Trakan's Avatar
Join Date: Sep 2010
Location: France
Posts: 64
Trakan is an unknown quantity at this point
Quote:
Originally Posted by BboyEatsbacon View Post
Use a for() loop to clean up this code. Repeating code is most always a bad thing, especially in one instance after another.
Thanks, that's what i need to know
Reply With Quote
  #16  
Old 12-24-2012, 05:42 PM
papajchris papajchris is offline
Zeus Condero
papajchris's Avatar
Join Date: Jan 2006
Location: Michigan
Posts: 1,600
papajchris is a splendid one to beholdpapajchris is a splendid one to beholdpapajchris is a splendid one to beholdpapajchris is a splendid one to behold
I accept you for who you are
__________________
Reply With Quote
  #17  
Old 12-24-2012, 06:48 PM
Trakan Trakan is offline
It's all about cats!
Trakan's Avatar
Join Date: Sep 2010
Location: France
Posts: 64
Trakan is an unknown quantity at this point
Thanks dude xD

Okay i now have:

PHP Code:
// Scripted by *Trakan
//#CLIENTSIDE
function onKeyPressed(keyCodekeyNamescanCode) {
  if (
keyName == "e") {
    if (
player.dir == && !indodge) {
      
freezeplayer(1.5);
      
setani gh_gani_roulade, ;
      
set indodge;
      for (
temp.0temp.4temp.i++) {
        
player.+= 1;
        
sleep(.1);
      }
      
sleep(0.5);
      unset 
indodge;
      
setani idle, ;
    }
    if (
player.dir == && !indodge) {
      
freezeplayer(1.5);
      
setani gh_gani_roulade, ;
      
set indodge;
      for (
temp.0temp.4temp.i++) {
        
player.-= 1;
        
sleep(.1);
      }
      
sleep(0.5);
      unset 
indodge;
      
setani idle, ;
    }
    if (
player.dir == && !indodge) {
      
freezeplayer(1.5);
      
setani gh_gani_roulade, ;
      
set indodge;
      for (
temp.0temp.4temp.i++) {
        
player.-= 1;
        
sleep(.1);
      }
      
sleep(0.5);
      unset 
indodge;
      
setani idle, ;
    }

  if (
player.dir == && !indodge) {
    
freezeplayer(1.5);
    
setani gh_gani_roulade, ;
    
set indodge;
    for (
temp.0temp.4temp.i++) {
      
player.+= 1;
      
sleep(.1);
    }
    
sleep(0.5);
    unset 
indodge;
    
setani idle, ;
  }
}

It's work fine! But.. players can go in blocking tiles as i say before. How can I select the tiles that I do not want the player went on?

Last edited by Trakan; 12-24-2012 at 07:33 PM..
Reply With Quote
  #18  
Old 12-25-2012, 12:24 AM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
Quote:
Originally Posted by Crow View Post
I wonder why
What? O_o

And as for blocking tiles.
PHP Code:
  tiles[xy]; 
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #19  
Old 12-25-2012, 12:44 AM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Quote:
Originally Posted by Gunderak View Post
And as for blocking tiles.
PHP Code:
  tiles[xy]; 
so you expect him to write down all blocking tiles while he could do a simple onwall(), onwall2() or tiletype() check?

Quote:
Originally Posted by Trakan View Post
Thanks dude xD

Okay i now have:

PHP Code:
// Scripted by *Trakan
//#CLIENTSIDE
function onKeyPressed(keyCodekeyNamescanCode) {
  if (
keyName == "e") {
    if (
player.dir == && !indodge) {
      
freezeplayer(1.5);
      
setani gh_gani_roulade, ;
      
set indodge;
      for (
temp.0temp.4temp.i++) {
        
player.+= 1;
        
sleep(.1);
      }
      
sleep(0.5);
      unset 
indodge;
      
setani idle, ;
    }
    if (
player.dir == && !indodge) {
      
freezeplayer(1.5);
      
setani gh_gani_roulade, ;
      
set indodge;
      for (
temp.0temp.4temp.i++) {
        
player.-= 1;
        
sleep(.1);
      }
      
sleep(0.5);
      unset 
indodge;
      
setani idle, ;
    }
    if (
player.dir == && !indodge) {
      
freezeplayer(1.5);
      
setani gh_gani_roulade, ;
      
set indodge;
      for (
temp.0temp.4temp.i++) {
        
player.-= 1;
        
sleep(.1);
      }
      
sleep(0.5);
      unset 
indodge;
      
setani idle, ;
    }

  if (
player.dir == && !indodge) {
    
freezeplayer(1.5);
    
setani gh_gani_roulade, ;
    
set indodge;
    for (
temp.0temp.4temp.i++) {
      
player.+= 1;
      
sleep(.1);
    }
    
sleep(0.5);
    unset 
indodge;
    
setani idle, ;
  }
}

things you should fix:
PHP Code:
setani("ani"params); //proper gs2; if you dont have params make it NULL (params part)

this.indodge boolean//boolean is true or false; should be used instead of using (un)set

for (temp.0temp.4temp.i++) {
  if (
onwall2(player.x+0.5player.y+1+122)) continue;
  
//onwall2(x, y, width, height);
  //at the player.y part i added two +1 because the first is to have it go down to the "default" block check and the
  //2nd one is for the new y position, personal reference of doing it like this; should be fixed with '-' or at the
  //'player.x' parts when you are using it in other directions
  //continue should make it leave the for() loop when you are on the wall (regarding the check)

  
player.+= 1;
  
sleep(.1);

__________________
MEEP!
Reply With Quote
  #20  
Old 12-25-2012, 12:09 PM
Trakan Trakan is offline
It's all about cats!
Trakan's Avatar
Join Date: Sep 2010
Location: France
Posts: 64
Trakan is an unknown quantity at this point
Now go this, is it good?
PHP Code:
// Scripted by *Trakan
//#CLIENTSIDE
function onKeyPressed(keyCodekeyNamescanCode) {
  if (
keyName == "e") {
    if (
player.dir == && !indodge) {
      
freezeplayer(0.8);
      
setani("gh_gani_roulade"NULL);
      
set indodge;
for (
temp.0temp.4temp.i++) {
  if (
onwall2(player.x+0.5player.y+1+122)) continue;
        
player.+= 1;
        
sleep(.1);
      }
      
sleep(0.5);
      unset 
indodge;
      
setani("idle"NULL);
    }
    if (
player.dir == && !indodge) {
      
freezeplayer(0.8);
      
setani("gh_gani_roulade"NULL);
      
set indodge;
      for (
temp.0temp.4temp.i++) {
      if (
onwall2(player.x+0.5player.y+1+122)) continue;
        
player.-= 1;
        
sleep(.1);
      }
      
sleep(0.5);
      unset 
indodge;
      
setani("idle"NULL);
    }
    if (
player.dir == && !indodge) {
      
freezeplayer(0.8);
      
setani("gh_gani_roulade"NULL);
      
set indodge;
      for (
temp.0temp.4temp.i++) {
      if (
onwall2(player.x-0.5player.y-1-122)) continue;
        
player.-= 1;
        
sleep(.1);
      }
      
sleep(0.5);
      unset 
indodge;
      
setani("idle"NULL);
    }

  if (
player.dir == && !indodge) {
    
freezeplayer(0.8);
      
setani("gh_gani_roulade"NULL);
    
set indodge;
    for (
temp.0temp.4temp.i++) {
    if (
onwall2(player.x-0.5player.y-1-122)) continue;
      
player.+= 1;
      
sleep(.1);
    }
    
sleep(0.5);
    unset 
indodge;
    
setani("idle"NULL);
  }
}

Reply With Quote
  #21  
Old 12-25-2012, 12:13 PM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
Quote:
Originally Posted by callimuc View Post
so you expect him to write down all blocking tiles while he could do a simple onwall(), onwall2() or tiletype() check?



things you should fix:
PHP Code:
setani("ani"params); //proper gs2; if you dont have params make it NULL (params part)

this.indodge boolean//boolean is true or false; should be used instead of using (un)set

for (temp.0temp.4temp.i++) {
  if (
onwall2(player.x+0.5player.y+1+122)) continue;
  
//onwall2(x, y, width, height);
  //at the player.y part i added two +1 because the first is to have it go down to the "default" block check and the
  //2nd one is for the new y position, personal reference of doing it like this; should be fixed with '-' or at the
  //'player.x' parts when you are using it in other directions
  //continue should make it leave the for() loop when you are on the wall (regarding the check)

  
player.+= 1;
  
sleep(.1);

Whatever.
There are many ways of achieving the same thing.
I was simply providing one.
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #22  
Old 12-25-2012, 12:37 PM
Trakan Trakan is offline
It's all about cats!
Trakan's Avatar
Join Date: Sep 2010
Location: France
Posts: 64
Trakan is an unknown quantity at this point
I have a little problem, when i dodge up and down, it's not working very well
Reply With Quote
  #23  
Old 12-25-2012, 03:16 PM
MysticalDragon MysticalDragon is offline
Global Administration
MysticalDragon's Avatar
Join Date: Oct 2002
Location: Lynn Ma
Posts: 883
MysticalDragon is a jewel in the roughMysticalDragon is a jewel in the rough
Send a message via AIM to MysticalDragon Send a message via MSN to MysticalDragon
Quote:
Originally Posted by Gunderak View Post
I think this ends now.
Reborn is frowned upon.
Good day to you.
Although I dislike reborn, I respect what they did. Instead of Lurking around the forums crying about how graal is they did something about it.

On Topic,
Don't use unset indodge its deprecated. Use temp Variables like Callimuc suggested.
__________________
~Delteria Support
~Playerworld Support
~PWA Chief
http://support.toonslab.com
[email protected]



Reply With Quote
  #24  
Old 12-26-2012, 12:54 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
HTML Code:
function onKeyPressed(keyCode, keyName, scanCode) {
  if (keyName != "e") return;
  if (this.inMotion) return;

  this.inMotion = true;
  player.ani = "gh_gani_roulade";
  for (temp.i = 0; temp.i < 3; temp.i++) {
    if (onwall2(player.x + (vecx(player.dir)*1.5), player.y + (vecy(player.dir)*1.5), 2, 2)) break;

    if (player.dir in {1, 3}) player.x += vecx(player.dir)*1.5;
    else if (player.dir in {0, 2}) player.y += vecy(player.dir)*1.5;
    sleep(0.05);
  }
  this.inMotion = false;
  player.ani = "idle";  
}
Should work in all directions.
Look up VECX and VECY - everything else is straight forward
__________________
Reply With Quote
  #25  
Old 12-26-2012, 01:19 PM
Trakan Trakan is offline
It's all about cats!
Trakan's Avatar
Join Date: Sep 2010
Location: France
Posts: 64
Trakan is an unknown quantity at this point
Quote:
Originally Posted by xAndrewx View Post
HTML Code:
function onKeyPressed(keyCode, keyName, scanCode) {
  if (keyName != "e") return;
  if (this.inMotion) return;

  this.inMotion = true;
  player.ani = "gh_gani_roulade";
  for (temp.i = 0; temp.i < 3; temp.i++) {
    if (onwall2(player.x + (vecx(player.dir)*1.5), player.y + (vecy(player.dir)*1.5), 2, 2)) break;

    if (player.dir in {1, 3}) player.x += vecx(player.dir)*1.5;
    else if (player.dir in {0, 2}) player.y += vecy(player.dir)*1.5;
    sleep(0.05);
  }
  this.inMotion = false;
  player.ani = "idle";  
}
Should work in all directions.
Look up VECX and VECY - everything else is straight forward
Thanks! It work fine but it does not look like realist because there are not the sleep(.1); ect... I try to fix that

EDIT: fixed, thanks dude

EDIT2: @xAndrewx: I don't know where i put the freezeplayer xD

Last edited by Trakan; 12-26-2012 at 01:47 PM..
Reply With Quote
  #26  
Old 12-26-2012, 02:29 PM
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
Keep in mind that setting player.ani the way Andy does is only supported on v6 and above.
__________________
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 06:42 PM.


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