I am well aware that this had been asked a bajillion times before, but can anyone help me compile a roll code? Currently I'm using an edited / revised version of Goodnight's engine, and I've come up with this.
if global.facing="R" and moving=true and holdspace=true and place_free(x+2,y) and global.rolling=false
{
x+=2;sprite_index=sprLinkRollR;global.rollfinished=false;rolling=true;
}
else if moving=true and global.rolling=true and sprite_index=sprLinkRollR and image_index=6;
{
sprite_index=sprLinkStandR;global.rollfinished=false;rolling=false
}
However, that permanenetly sets the sprite to sprLinkStandR, and if you hold space while pressing right, you slide forward indefinitely(as long as you press it). The roll sprite never comes into play at all.
Anyone think they can help? I would like to know what I'm doing wrong. Anyways, thanks in advance.