Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by AndrewAMD. 08/27/26 15:28
Retrieve optimize() variables order (edited)
by NorbertSz. 08/25/26 13:24
Max Number of Strategies in /Strategy folder
by Martin_HH. 08/17/26 07:54
Pause button for evaluation shell?
by AndrewAMD. 08/13/26 17:16
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 08/10/26 12:46
phantom() not defined in indicators.c
by jcl. 08/07/26 11:45
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (Quad), 6,851 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
riggi89, shuhari, KD1990, Student_64151, Koti
19230 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Play animation forward and backward .. #206251
05/12/08 12:07
05/12/08 12:07
Joined: Mar 2008
Posts: 15
B
betuveen Offline OP
Newbie
betuveen  Offline OP
Newbie
B

Joined: Mar 2008
Posts: 15

Hi, I'm using the very old A5's template script for mah game. And I found this code in the animate.wdl, it's for the jumping animation.

 Code:
/////////////////////////////////////////////////////////////////////
		// Animations that can take place standing still (jumping, ducking, etc.)
		/////////////////////////////////////////////////////////////////////
   	// the jumping animation
		if(MY._MOVEMODE == _MODE_JUMPING)
		{
//opt. 			temp2 = 4*INT(((-MY._ADVANIM_TICK)&MASK_ANIM_JUMP_TICKS)>>6);// anim_jump_ticks
 			temp2 = INT(((-MY._ADVANIM_TICK)&MASK_ANIM_JUMP_TICKS)>>4);// anim_jump_ticks
			// calculate a percentage out of the animation time
			temp =  100 * MY._ANIMDIST / temp2;
			// set the frame from the percentage
			ent_frame(anim_jump_str,temp);
			// increment _ANIMDIST by elapsed time
			MY._ANIMDIST += TIME;
			// check to see if we finished jump animation
			if(MY._ANIMDIST > temp2)
			{
				MY._ANIMDIST = 0;
				MY._MOVEMODE = _MODE_WALKING;
			}
			return;
		}


It's cool, but the problem is, my character model have only half of the jumping animation, so I have to play the jump animation forward (from "jump 1" frame to "jump 24"), then backward (from 24 to 1) again to complete the jump.

I'm not a coder so I tried but can't make it work. Would you please help me? Thanks!

Re: Play animation forward and backward .. [Re: betuveen] #206369
05/13/08 08:36
05/13/08 08:36
Joined: Mar 2008
Posts: 15
B
betuveen Offline OP
Newbie
betuveen  Offline OP
Newbie
B

Joined: Mar 2008
Posts: 15
Ok, NVM, I've found a way, copy frames in Med to complete the jump animation.


Gamestudio download | 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