description:
1 obj
3 sprites
3-8 sub images for each sprite
this code works for movement: Step event
var moving;
moving=false;
image_angle=point_direction(x,y,mouse_x,mouse_y);
if keyboard_check(ord("D")) && place_free(x+6,y) && x<room_width
{
x+=6;
moving=true;
}
if moving=true
{
sprite_index=sprwalk image_speed=.3
}this doesnt: Step event
if mouse_check_button(mb_left) && global.blast=1 && global.mana>=1 && global.chamber<=0
{
instance_create(x,y,objbullet)
global.mana-=5
global.chamber=10
sprite_index=sprcast image_speed=.3
}so why doesnt the sprite go back to sprstand immedieatly,by logic you would think this code that when i clicked it would try to animate but on the next step just go back to sprstand(obviously not what im lookin for). instead the animation just loops over and over.
Edited by Zhavens, 24 April 2012 - 02:42 PM.











