Ok... back to the roots...
Do you have a state machine implemented in your code to manage all the animations and all other things happening with your player?
No - implement it and your problem will be solved.
Yes - review your code step by step and try to find flaws in your logic...
Thanks for responding!
I do indeed have state machine and I tried to see if there was anything wrong with it. but alas I couldn't find anything!(I don't know if i'm dumb and there is a mistake that i missed, it would help me a ton if you look over this and yes the object it persistent)
PObject
create
//weapons
enum WEAPONS_MODE
{
HANDS,
PLASMA
}
weapons = WEAPONS_MODE.HANDS
step
//Animation(complex)
switch (weapons)
{
case WEAPONS_MODE.HANDS:
{
Unarmed();
break;
}
case WEAPONS_MODE.PLASMA:
{
Plasmagun();
break;
}
}
Unarmed
if (!place_meeting(x,y+1,WObject))
{
sprite_index = PlayerA;
image_speed = 20;
if (sign(vsp) > 20) image_index = 1; else image_index = 1;
}
else
{
image_speed = 1;
if (hsp == 0)
{
sprite_index = Player;
}
else
{
sprite_index = PlayerR;
}
}
if (hsp != 0) image_xscale = sign(hsp);
Plasmagun
//Animation
if (!place_meeting(x,y+1,WObject))
{
sprite_index = sPGunPlasmaA;
image_speed = 20;
if (sign(vsp) > 20) image_index = 1; else image_index = 1;
}
else
{
image_speed = 1;
if (hsp == 0)
{
sprite_index = sPGunPlasma;
}
else
{
sprite_index = sPGunPlasmaR;
}
}
if (hsp != 0) image_xscale = sign(hsp);
Thank you so much