Page 1 of 1
Problems with animations. Please HELP!
Posted: Fri Oct 04, 2013 9:24 am
by correctmushroom2013
I created an animation gate. When destroyed console, the gate opens.
Question: how to make that when I fix the console, the gate closes?
Please explain in detail how to make it work.
Here is my lua script:
I have created only one animation - opening the gate.
Please help!

Re: Problems with animations. Please HELP!
Posted: Fri Oct 04, 2013 8:34 pm
by AQT
RewindAnimation doesn't actually play the animation you specify backwards. All it does is instantaneously return the animated object to the first frame of the animation. What you want to do is create a second animation called, say, closed. This animation would have the same frames as the "open" animation, but with the frames in reversed order. Then use PlayAnimation("closed") instead of RewindAnimation("open").
Re: Problems with animations. Please HELP!
Posted: Sat Oct 05, 2013 6:59 am
by correctmushroom2013
I did as you said. But the animation does not occur.
Here is my lua:
Perhaps this is the wrong lua code?I replaced the animation "closed" in the code to "objectkill" and the animation is playing.
Re: Problems with animations. Please HELP!
Posted: Sun Oct 06, 2013 9:03 pm
by AQT
Try replacing repairer with actor. If that doesn't work, I don't have any other ideas.
Re: Problems with animations. Please HELP!
Posted: Sun Oct 06, 2013 10:37 pm
by Locutus
Use this instead:
Code: Select all
OnObjectRespawn(
function (object)
if GetEntityName(object) == "gatepanel" then
PlayAnimation("closed")
end
end
)
Re: Problems with animations. Please HELP!
Posted: Wed Oct 09, 2013 11:38 am
by correctmushroom2013
Animation work: "open" and "closed", but only once. What to do?
I break the panel - the gate is opening.
I repair the panel - the gates closes.
I break the panel - nothing happens ...
Re: Problems with animations. Please HELP!
Posted: Thu Oct 10, 2013 8:45 pm
by Locutus
AQT mentioned what you need in the second post.
Add RewindAnimation("NAME") before PlayAnimation("NAME").
Re: Problems with animations. Please HELP!
Posted: Sat Nov 02, 2013 7:59 am
by correctmushroom2013
Works only animation "closed." I added the same line in the animation "open", but it does not work.
My lua:
EDIT
Please reply!
No matter what I did, animations do not work.
Double posting is against the RULES; please EDIT your post instead -Staff
Re: Problems with animations. Please HELP!
Posted: Mon Nov 04, 2013 12:34 pm
by Locutus
Your problem is that your animations don't play a second time, right?
Vanilla scripts often use PauseAnimation before rewinding them, maybe that helps:
PauseAnimation("NAME")
RewindAnimation("NAME")
PlayAnimation("NAME")
Also, make sure there is no space between RewindAnimation and the opening bracket.
Re: Problems with animations. Please HELP!
Posted: Tue Nov 19, 2013 12:34 pm
by correctmushroom2013
You'll excuse me, I'm an idiot. It does not work. I even combine these lines, but nothing else.
The same thing happens.

Re: Problems with animations. Please HELP!
Posted: Tue Nov 19, 2013 5:38 pm
by AceMastermind
The bridge on Mustafar and the gate on Kashyyyk would be 2 stock examples you can use as a template.