Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Diving Roll #286384
08/25/09 05:07
08/25/09 05:07
Joined: Jul 2009
Posts: 85
A
Altarius Offline OP
Junior Member
Altarius  Offline OP
Junior Member
A

Joined: Jul 2009
Posts: 85
Hi,

Im trying too make my player move foward when i press space_bar until my dive_roll animation are done.

This is my function to run the animation...

/////////////////////////////////////////////////////
function animate_startup()
{
var anim_percentage = 0;
while (1)
{
while (!key_space) {wait (1);}
while (anim_percentage < 100)
{
//player.x += 10 *time_step;
anim_percentage += 10 * time_step;
ent_animate(player, "dive", anim_percentage,NULL);
wait (1);
}
anim_percentage = 0;
while (key_space) {wait (1);}
wait (1);
}
}
/////////////////////////////////////////////////

I tried to add this line player.x += 10 *time_step.. like u can see at the commented line... but that not work correctly... anyone can help me plz

Re: Diving Roll [Re: Altarius] #286443
08/25/09 10:47
08/25/09 10:47
Joined: Aug 2008
Posts: 482
B
bart_the_13th Offline
Senior Member
bart_the_13th  Offline
Senior Member
B

Joined: Aug 2008
Posts: 482
Sorry if I mess up with your code.
Hope this help:
Code:
function animate_startup()
{
  var anim_percentage = 0;
  while (1)
  {
     if(key_space && anim_percentage < 100)
     {
       player.x += 10 *time_step;
       anim_percentage += 10 * time_step;
       ent_animate(player, "dive", anim_percentage,NULL);
     }
     else
     {
       anim_percentage = 0;
     }
     wait (1);
   }
}



Havent tested tough...


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1