A
anthropus
Guest
here the whole proj file just in case
https://www.dropbox.com/sh/hejle9xb5t4veay/AABRwpsdZb7L6kiMUjfq4JXTa?dl=0
"Q" slows down room speed
"R" restarts room
its weird, when the sprite first plays it starts at sub image 1, skipping sub image 0 (the first one), but then when it loops it does play sub image 0. so it just skips the first sub image the first time around. i know because i slowed down the room speed so i can analyze the animation and sure enough just as i said above.
and to make matters worse, it seems as if its player that objects sprite in reverse!
it seems to be happening for all the sprites of one object only (the player object); other sprites work fine.
i searched all my code and cant seem to find why this is. is it a bug? is there something in my code that im missing?
does image_index refer to the sub_image (for example, does image_index==0 refer to sub_image 0)?
any ideas?
(all code below otherwise works good;
code below is in a script that is working fine;
the sprite in question here is the sp_celes_melee_attack...)
https://www.dropbox.com/sh/hejle9xb5t4veay/AABRwpsdZb7L6kiMUjfq4JXTa?dl=0
"Q" slows down room speed
"R" restarts room
its weird, when the sprite first plays it starts at sub image 1, skipping sub image 0 (the first one), but then when it loops it does play sub image 0. so it just skips the first sub image the first time around. i know because i slowed down the room speed so i can analyze the animation and sure enough just as i said above.
and to make matters worse, it seems as if its player that objects sprite in reverse!
it seems to be happening for all the sprites of one object only (the player object); other sprites work fine.
i searched all my code and cant seem to find why this is. is it a bug? is there something in my code that im missing?
does image_index refer to the sub_image (for example, does image_index==0 refer to sub_image 0)?
any ideas?
(all code below otherwise works good;
code below is in a script that is working fine;
the sprite in question here is the sp_celes_melee_attack...)
Code:
//melee attack state
img_spd=1;
//create correctly facing weapons obj-sprite
switch (currently_facing)
{
case facing.upward:
if (!instance_exists(o_par_ice_scepter_melee))
{
sprite_index=sp_celes_melee_attack_up;
image_speed=img_spd;
instance_create(o_celes.x, o_celes.y, o_ice_scepter_melee_up);
}
break;
case facing.downward:
if (!instance_exists(o_par_ice_scepter_melee))
{
sprite_index=sp_celes_melee_attack_down;
image_speed=img_spd;
instance_create(o_celes.x, o_celes.y, o_ice_scepter_melee_down);
}
break;
case facing.rightward:
if (!instance_exists(o_par_ice_scepter_melee))
{
sprite_index=sp_celes_melee_attack_right;
image_speed=img_spd;
instance_create(o_celes.x, o_celes.y, o_ice_scepter_melee_right);
}
break;
case facing.leftward:
if (!instance_exists(o_par_ice_scepter_melee))
{
sprite_index=sp_celes_melee_attack_left;
image_speed=img_spd;
instance_create(o_celes.x, o_celes.y, o_ice_scepter_melee_left);
}
break;
}
//make last frame hold
//go back to idle
if (o_par_ice_scepter_melee.image_index==6)
{
current_state=celes_state.idle;
}
Last edited by a moderator: