08-31-2015, 07:57 PM
(This post was last modified: 08-31-2015, 07:59 PM by Mat(Nerah).)
You could try something like this to advance your event check ig: player's vspeed=0 so he is idle
(Then you might be able to condense your armor switch code as well as the normal sprites, based on movement variables)
If you give me your variables I could edit this code more for you.
though this may be plug and play; fair warning please back up before trying this. Though the code has no syntax errors.
Hope this may help, even if you don't use it you could learn from it. You seem to be a promising coder ^-^
(Then you might be able to condense your armor switch code as well as the normal sprites, based on movement variables)
If you give me your variables I could edit this code more for you.
though this may be plug and play; fair warning please back up before trying this. Though the code has no syntax errors.
Code:
//Idle
if armor=1 && vspeed=0
then sprite_index=spr_valo_idle{sprite_index=spr_toroarmor_idle}
if armor=1 && hspeed=0
then sprite_index=spr_valo_idle{sprite_index=spr_toroarmor_idle}
//Jumping (Rising/Falling)
if armor=1 && vspeed<1 or vspeed>-1
then sprite_index=spr_valo_jump{sprite_index=spr_toroarmor_jump}
//Backflip
if armor=1 && backflip=true
then sprite_index=spr_valo_backflip{sprite_index=spr_toroarmor_backflip}
if armor=1 && backflip=false
then sprite_index=spr_valo_idle{sprite_index=spr_toroarmor_idle}
//Shooting
if armor=1 && shooting=true
then sprite_index=spr_valo_shoot{sprite_index=spr_toroarmor_shoot}
if armor=1 && shooting=true && hspeed<0 or hspeed>0
then sprite_index=spr_valo_run_shoot{sprite_index=spr_toroarmor_run_shoot}
//Running
if armor=1 && hspeed<3 or hspeed>-3
then sprite_index=spr_valo_run{sprite_index=spr_toroarmor_run}
//Walking
if armor=1 && hspeed<=1 or hspeed>=1
then sprite_index=spr_valo_walk{sprite_index=spr_toroarmor_walk}
//Draw our player
draw_sprite_ext(sprite_index,image_index,x,y,flipped,image_yscale,image_angle,image_blend,image_alpha)
Hope this may help, even if you don't use it you could learn from it. You seem to be a promising coder ^-^