I Wanna Community
Fangames => Game Design => Programming Questions => Topic started by: thefatkid22 on October 16, 2016, 10:10:06 PM
-
Hello,
I'm using that IWBT Studio Engine YoYoYo Edition v1_40 and I'm trying to change the idle animation as follows. I would like the initial idle animation to play through once then have it play on repeat a follow up idle animation that is subtly different. I am having a hard time figuring out the coding I've tried to use a while loop and an if else statement to try and replace the idle animation but I get the same problem with only one of the animations plays.
Please help if it's even possible.
Thanks,
-
This is what I would try:
//create
idle=false;
//step
if(sprite_index=[sprite you want to use for second animation]){
idle=true;
}else{
idle=false;
}
if(image_index=3 && idle!=true){
sprite_index=[sprite you want to use for second animation];
}
Can't say for certain this will work, but it's worth a shot :4Head:
-
Ok I tried that but all I am getting is animation 1.
Here's what I have under the Player object:
//step
if(sprite_index=sprPlayerStand){
idle = true;
}else{
idle = false;
}
if(image_index =3 && idle != true){
sprite_index = sprPlayerStand;
}
sprite_index = sprPlayerIdle;
image_speed = 0.2;
and i have the idle variable set in the //create set to false.