• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Windows Using acceleration in animation speeds/image_speed & more

C

Chungsie

Guest
so I got my game working again, after a fresh install. I was wondering tho, I have a mechanic I think players may want to use, that sort of adds more physics to the game, it is simply called RPG and the variable for it is RPG-Mechanics

I have some basic variables for the player animations:
g.img_spd = 1;
g.img_cur = 0;
g.img_max = 0.5;

where img_max is the top speed for animations.
if (OPT_RPG_Mech == 1) {
global.img_spd = global.agi / 100;
}

g.agi = 5;

what is a simple way to have it so img_cur increases by img_spd per step until it maxes at img_max if the mechanic is true?
 
H

HammerOn

Guest
With ease out effect:
variable += (target_value - variable) * unit_percentage;
 
Top