Forum rules - please read before posting.

Hiding an animation and then unhiding/restarting animation

After searching for a few hours on how to do this.. i am frustrated so hoping someone can help me out here..

Alright so I managed to hide an animation (which is an animated background object that i dont want visible at the start of the game) by using a cutscene that runs when the game starts. The cutscene makes this animated object [object: invisible]..
BUT,, when the player enters a trigger i want the animation to become visible & play from the first frame after a series of other actions that are triggered by the trigger.. but if i just make it visible again the animation has already played.. 

Attempted to use the object: animate.. before making it visible but that doesnt seem to work. 

Also tried using object: add or remove with no luck.. since when trying to add the object back into the scene when the player enters the trigger it just doesnt.

feel i am missing key information on how to get stuff to work beyond whats shown in the 2d tutorial on here and elsewhere on youtube. Feel I need more tutorials on how to do simple stuff that isnt in the 2d tutorial as I am not the sharpest tool in the shed and having a bit of a hard time finding specific things i guess? tried to figure it out based off of some of the written tutorials etc.. but =(

Any help much appreciated! Im fairly new to adventure creator & previously was using visionaire studio.

Comments

  • Welcome to the community, @Ghostlyguru.

    Don't feel bad about having trouble, though this is more of a Unity problem since AC relies on Unity for animation handling - and any quirks that come with it.

    Rather than hiding your animation by physically changing the root GameObject, try instead creating a "hidden" animation as part of your background's animation set.

    You ought to be using an Animator component (i.e. Mecanim) for this animation already, so just create another animation that swaps the sprite with an empty (1x1) image or just disables the SpriteRenderer component.  You can then set it as the default animation in your Animator window by right-clicking it (to avoid having to force it in the opening Cutscene), and then use the Object: Animate Action when you're ready to play the "proper" animation.
  • edited September 2016
    think im figuring it out... thanks! ill give it some more time till i actually have it working before i explode.
  • edited September 2016
    Okay i figured it out! You have to actually type in the name of the animation clip.. hooooraayy! thanks a bunch! kept searching through the various animation types legacy etc.. trying to see how to call in the specific animation by browsing through assets. ha..ha..
  • If you're using Mecanim (which you should be - Legacy was from Unity 4 years ago), you have the option of either entering in the animation's name, or manipulating the values of your Mecanim parameters.
  • Thanks for the help! my sun setting animation looks beautiful!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.