R
Rabid Guineapig
Guest
So, I started remaking a game I've worked on since about the GM6 days, using GM Studio 2 now, took a while to get used to the new interface after so long using older versions and being too stubborn to try the new one. That's not important though...
What IS important is I have a very strange glitch regarding my main character's animations. Basically, when ever he faces right he flat out disappears! He's still physically there, he just goes invisible! All of the sprite names are correct. I use a variable "face", =1 for right, =0 for left. Pretty standard stuff I think. Again, the character is physically there, he interacts as normal, collision is correct, he just goes invisible! EVERYTHING that happens when he's facing left works just fine.
Here is the code for animation so far:
//Animation------------------------------------------------------
if(vmove=1)
{
if (face=1) {sprite_index=s_cherry_jumpR if(vsp>0){image_index=1} if(vsp<0){image_index=0}}
if (face=0) {sprite_index=s_cherry_jumpL if(vsp>0){image_index=1} if(vsp<0){image_index=0}}
}
if(vmove=0)
{
if(face=1)
{
if(hmove=0)
{sprite_index=s_cherry_standR image_speed=0.1}
{
if(hmove=1)
{sprite_index=s_cherry_runR image_speed=abs(hsp)/6}
if(hmove=-1)
{sprite_index=s_cherry_skidL image_speed=0.1 instance_create_depth(x,y,random(2),o_poof)}
}}
if(face=0)
{
if(hmove=0)
{sprite_index=s_cherry_standL image_speed=0.1}
{
if(hmove=-1)
{sprite_index=s_cherry_runL image_speed=abs(hsp)/6}
if(hmove=1)
{sprite_index=s_cherry_skidR image_speed=0.1 instance_create_depth(x,y,random(2),o_poof)}
}
}
}
vmove and hmove check whether he's moving vertically or horizontally respectively.
As you can see, if vmove=1 then he's in the air. animate accordingly. Image index checks either going up or down, 1 for falling, 0 for jumping. that's all well and good. But why is he invisible when he faces right?!
The funny thing is, it was working just fine before! Can someone please help!? It's driving me nuts!
What IS important is I have a very strange glitch regarding my main character's animations. Basically, when ever he faces right he flat out disappears! He's still physically there, he just goes invisible! All of the sprite names are correct. I use a variable "face", =1 for right, =0 for left. Pretty standard stuff I think. Again, the character is physically there, he interacts as normal, collision is correct, he just goes invisible! EVERYTHING that happens when he's facing left works just fine.
Here is the code for animation so far:
//Animation------------------------------------------------------
if(vmove=1)
{
if (face=1) {sprite_index=s_cherry_jumpR if(vsp>0){image_index=1} if(vsp<0){image_index=0}}
if (face=0) {sprite_index=s_cherry_jumpL if(vsp>0){image_index=1} if(vsp<0){image_index=0}}
}
if(vmove=0)
{
if(face=1)
{
if(hmove=0)
{sprite_index=s_cherry_standR image_speed=0.1}
{
if(hmove=1)
{sprite_index=s_cherry_runR image_speed=abs(hsp)/6}
if(hmove=-1)
{sprite_index=s_cherry_skidL image_speed=0.1 instance_create_depth(x,y,random(2),o_poof)}
}}
if(face=0)
{
if(hmove=0)
{sprite_index=s_cherry_standL image_speed=0.1}
{
if(hmove=-1)
{sprite_index=s_cherry_runL image_speed=abs(hsp)/6}
if(hmove=1)
{sprite_index=s_cherry_skidR image_speed=0.1 instance_create_depth(x,y,random(2),o_poof)}
}
}
}
vmove and hmove check whether he's moving vertically or horizontally respectively.
As you can see, if vmove=1 then he's in the air. animate accordingly. Image index checks either going up or down, 1 for falling, 0 for jumping. that's all well and good. But why is he invisible when he faces right?!
The funny thing is, it was working just fine before! Can someone please help!? It's driving me nuts!
Attachments
-
118.7 KB Views: 10