Fangames > Programming Questions
Idle animation help
(1/1)
thefatkid22:
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,
infern0man1:
This is what I would try:
--- Code: ---//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];
}
--- End code ---
Can't say for certain this will work, but it's worth a shot :4Head:
thefatkid22:
Ok I tried that but all I am getting is animation 1.
Here's what I have under the Player object:
--- Code: ---//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;
--- End code ---
and i have the idle variable set in the //create set to false.
Navigation
[0] Message Index
Go to full version