The System works and does basically what I was expecting it to, However the Jump no longer has a key up event so that wen I lift the key up he stays in a jump posture.
What is with those "!" marks in the code?
Turon wrote:What is with those "!" marks in the code?
Turon wrote:However the Jump no longer has a key up event so that wen I lift the key up he stays in a jump posture.
if(ChangeAnimation("Event Actor", "PlayerJumpLeft", NO_CHANGE); && (ChangeAnimation("Event Actor", "PlayerJumpRight", NO_CHANGE); == jump && canjump == 1, if (dir==1) (ChangeAnimation("Event Actor", "PlayerStillLeft", NO_CHANGE) if (dir==2) (ChangeAnimation("Event Actor", "PlayerStillRight", NO_CHANGE);
Turon wrote:OK OK I braved it! but it doesnt work (I just pasted it at the bottom of the existing code) and worst of all its a monster code!
- Code: Select all
if(ChangeAnimation("Event Actor", "PlayerJumpLeft", NO_CHANGE); && (ChangeAnimation("Event Actor", "PlayerJumpRight", NO_CHANGE); == jump && canjump == 1, if (dir==1) (ChangeAnimation("Event Actor", "PlayerStillLeft", NO_CHANGE) if (dir==2) (ChangeAnimation("Event Actor", "PlayerStillRight", NO_CHANGE);
all of that code is in a strait line and a VERY long line.
lcl Wrote:
You say that you just pasted the code to the bottom line of the existing code. Where did you get this code? Also, you should never just paste some code from somewhere, it won't ever work.
You have to first figure out what the code is doing.
Hares Wrote:
(if animation == jumping and canjump == 1, change animation to ... )
Hares wrote:(if animation == jumping and canjump == 1, change animation to ... )
jump=1
jump=1;
if (animindex==5)
//PlayerJumpLeft is animindex 5
{
ChangeAnimation("Event Actor", "PlayerStillLeft", FORWARD);
}
if (animindex==6)
//PlayerJumpRight is animindex 6
{
ChangeAnimation("Event Actor", "PlayerStillRight", FORWARD);
}
if (yvelocity!=0 && jump!=1)
// IF MOVING VERTICAL WHILE NOT BEING ABLE TO JUMP
{
if (dir==1)
{
ChangeAnimation("Event Actor", "PlayerJumpLeft", NO_CHANGE);
}
if (dir==2)
{
ChangeAnimation("Event Actor", "PlayerJumpRight", NO_CHANGE);
}
}
jump=1;
Turon wrote:& I'm sorry say that I still do quite understand the "!" In the code are for, I'd think that 0 stands for "off" & 1 stands for "on".
!=
if (yvelocity!=0 && jump!=1)
Users browsing this forum: No registered users and 1 guest