Hi!
Ripper, I have the same problem, so I am kind of using your thread. Hope, that is ok
My actor is supposed to move in 3 directions - left - right - jump. I'd like to use MouseEnter Events for left - right.
They work fine unless the player uses the jump button which is a Mouse Button Down Event. The actor moves right or left. Once the jump button is pressed the x movement of the player stops.
I tried following skydereign's advice to destroy the jump button but it did not work. The problem persists.
This is the code I use (it is not the best programming style I know
).
Thanks for any help
Right Direction Button Mouse Enter (For left direction it is basically the same, therefore I don't post it)
- Code: Select all
if(Pause==0)
{ChangeAnimation("Rightbutton", "rightbuttoninactive_neu_small", FORWARD);};
MouseEnter = 1;
if (Pause == 0) {MinisterMove = 1;};
Right Direction Button Mouse Leave
- Code: Select all
if (Pause == 0) {ChangeAnimation("Rightbutton", "rightbuttoninactive_small", FORWARD);
};
if (Pause == 0) {MinisterMove = 0;
ChangeAnimation("Minister", "financeminister_standing_small", FORWARD);
MouseEnter = 1;
MinisterStop = 0;
MinisterDirec = 0;};
Jump Button Mouse Button Down
- Code: Select all
if (Pause == 0) {ChangeAnimation("Event Actor", "jumpbuttoninactive_neu_small", FORWARD);
};
if (Pause == 0) {
if(jump==1)
{
Minister.yvelocity=-16;
jump=0;
}
MinisterJump = 1;
switch(MinisterDirec)
{
case 0:
ChangeAnimation("Event Actor", "financeminister_stand_jump_small", FORWARD);
break;
case 1: //If previous animation was charLeft.
ChangeAnimation("Event Actor", "financeminister_r_jump_small", FORWARD);
break;
case 2:
ChangeAnimation("Event Actor", "financeminister_l_jump_small", FORWARD);
break;
};
DestroyActor("Event Actor");
CreateActor("Jumpbutton", "jumpbuttoninactive_small", "(none)", "(none)", 312, 292, true);
};
Jump Button Mouse Button Up
- Code: Select all
if (Pause == 0) {
ChangeAnimation("Event Actor", "jumpbuttoninactive_small", FORWARD);
};