An easy fix? (RPG system)
Posted: Tue Feb 21, 2012 4:53 pm
I'm trying to figure out a way to make the walk cycle perfectly similar to RPG maker style, in other words if your going right, and you press up, he will stop going right and instead move up (instead of 8 directions). And vise versa, as well. He will stop going up and go right if your pressing up first, then press right after.
I have this code, and it works for the right animation, but when he walks up he lops his up animation per frame making it look buggy
Any fixes please?
I have this code, and it works for the right animation, but when he walks up he lops his up animation per frame making it look buggy
- Code: Select all
if(key[KEY_RIGHT]==1 && key[KEY_UP]==1) {
if(animindex!=getAnimIndex("PlayerUp")) {
y-=3;
x-=3;
ChangeAnimation("Event Actor", "PlayerUp", NO_CHANGE);
}
else if(animindex!=getAnimIndex("PlayerRight")) {
x+=3;
y+=3;
ChangeAnimation("Event Actor", "PlayerRight", NO_CHANGE);
}
}
Any fixes please?