I made a region, called it "testfly" and made an animation called "testflight" that goes for 10 seconds. I unticked "Play when level starts" and everything is named right in ZE and the LUA, but nothing I do seems to trigger it when I enter the testfly region.
I`ve tried -
Hidden/Spoiler:
[code]
ActivateRegion("testfly")
testfunction = OnEnterRegion(
function(region, player)
if IsCharacterHuman (player) then
PlayAnimationFromTo("testflight",0.0,10.0)
end
end,
"testfly"
)[/code]
and
Hidden/Spoiler:
[code]
ActivateRegion("testfly")
testfunction = OnEnterRegion(
function(region, player)
if IsCharacterHuman (player) then
PlayAnimation("testflight")
end
end,
"testfly"
)[/code]
ActivateRegion("testfly")
testfunction = OnEnterRegion(
function(region, player)
if IsCharacterHuman (player) and IsCharacterInRegion(region) then
PlayAnimation("testflight")
end
end,
"testfly"
)
You could also try character inside the bit I added, not sure which one would make it work if that works
Did you also remember to check "Disable Hierarchies"? These are the settings your animation group should use:
Also, "testflight" is the name of the animation group, not the animation, right?
Oh, and what's the ClassLabel of the object are you trying to animate? This is found at the very top of the object's ODF. If you don't see it but you do see ClassParent, open up the ClassParent ODF and check that ODF's ClassLabel.
The animation group is called "testflying" and the object I`m animating is a droid gunship I turned into a prop. It`s an armedbuilding
Here`s the entire ODF -
SkinnyODST wrote:The animation group is called "testflying"
Then that's what you need to pass into the first argument of PlayAnimation (or whichever function you end up using). You can only play animation groups, not standalone animations. The standalone animation that you create is just a set of keyframes, it doesn't determine which props are animated or anything - that's all set up in the animation group.
PauseAnimation("Animation Group Name")
Pauses the group’s playback – objects remain where they are currently.
RewindAnimation("Animation Group Name")
Rewinds the group to the beginning. Can be called while the group is playing. If called while the group is stopped, play will resume from the beginning when Play is called.
PlayAnimationFromTo("Animation Group Name", beginTime, endTime)
beginTime and endTime are floating-point numbers, in seconds. Plays the indicated animation from beginTime to endTime. So for a 10-second animation, playing from 0 to 5 plays the first half, and playing from 5 to 10 plays the second half. See “Animation Start Points” below for more information.
SetAnimationStartPoint("Animation Group Name")
Takes the current positions of the objects referenced by the group, and uses those positions as the new start point for when that object is next animated.
Marth, you are amazing! This ENTIRE time I thought I had to put in the name of the animation, not the group. Now that I can do this, things are gonna get epic! Thank you sooooo much!
And sorry for a late reply, I was having a break from modding and playing Xbox instead