Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
2 registered members (steyr, alibaba), 534 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 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