N
NeonBits
Guest
I don't know if I have everything to make it perfect. If you like puzzles, here's one:
create_event :
"var_B" will decrease depending of the number inside "var_C".
"var_C" will increase (0, 0.1, 0.2, etc) until it reaches 1. It can also decrease until it reaches 0.
draw_event:
when "var_C" is greater than "0", I would like the sprite to move to the left until "var_A" reaches "415", during the small sequence held in "var_B".
At "var_B = 50", "var_A" = "660".
At "var_B = 0", "var_A" should be at "415" (660 - 415 = 245).
the answer is "var_A -= someting" but I'm just making things too fast or too slow. Best I get is:
because of codes somewhere else, once the situation has changed, where "var_A" is still substracted until "415".
edit: Maybe I should add that the sprite is 162w, 79h, origine: center, and is xscaled/yscaled at 0.1 for depth simulation.
create_event :
Code:
var_A = 660;
var_B = 50;
var_C = 0;
"var_C" will increase (0, 0.1, 0.2, etc) until it reaches 1. It can also decrease until it reaches 0.
draw_event:
Code:
draw_sprite_ext ( spr_sprite, 0 , var_A , .........);
At "var_B = 50", "var_A" = "660".
At "var_B = 0", "var_A" should be at "415" (660 - 415 = 245).
the answer is "var_A -= someting" but I'm just making things too fast or too slow. Best I get is:
Code:
var_A -= (245 / 100) * var_C;
edit: Maybe I should add that the sprite is 162w, 79h, origine: center, and is xscaled/yscaled at 0.1 for depth simulation.
Last edited by a moderator: