Mouse Button Down > Script Editor
- Code: Select all
ChangeAnimation("Event Actor", "StartD", FORWARD);
AllReadyUp = 1;
if(AllReadyUp)
{
ChangeAnimation("Event Actor", "StartU", FORWARD);
AllReadyUp = 0;
}
ChangeAnimation("Event Actor", "StartD", FORWARD);
AllReadyUp = 1;
if(AllReadyUp)
{
ChangeAnimation("Event Actor", "StartU", FORWARD);
AllReadyUp = 0;
}
__CAAZ__ wrote:Does anyone know whats wrong with this code?
Mouse Button Down > Script EditorI need it to change the animation when i click on it, and when i click on it again it will change back. but it doesn't work, no error messege shows up but the second mouse click doesn't work. What am i doing wrong?
- Code: Select all
ChangeAnimation("Event Actor", "StartD", FORWARD);
AllReadyUp = 1;
if(AllReadyUp)
{
ChangeAnimation("Event Actor", "StartU", FORWARD);
AllReadyUp = 0;
}
if(AllReadyUp == 1)
{
ChangeAnimation("Event Actor", "StartU", FORWARD);
AllReadyUp = 0;
{
ChangeAnimation("Event Actor", "StartD", FORWARD);
AllReadyUp = 1;
if(AllReadyUp)
{
//Second click
ChangeAnimation("Event Actor", "StartU", FORWARD);
AllReadyUp = 0;
}
else
{
//First click
ChangeAnimation("Event Actor", "StartD", FORWARD);
AllReadyUp = 1;
}
AllReadyUp = 1;
if(AllReadyUp == 1)
{
Users browsing this forum: No registered users and 1 guest