Hello,
I'm new with AC and I'm trying to develop my first game in 2D but I'm not sure about one thing. Let say that I have a mouse that is hidding a key behind him and I would like to give i'm an object in my inventory to make it walk a bit so that the key would be visible afterwords. Should I make the mouse an object or make an animation for it (I guess I would then have to make it a character?)?
Would you be able to give me the instructions on how to do so please?
Good day and thank you for AC!
Comments
I would advise that you make the mouse an NPC if you want freedom to move him around the scene with full walking animations, or have him speak. Otherwise, a Hotspot parented to a sprite object would be enough.
If he's only going to move the one time, then you could simply make a one-off movement animation for him (in the same way that the Bird in the 2D Demo is animated - he flies onto the bench with a Unity animation). Otherwise, you'll have to move him around using the Character: Move to point Action - it'll be eaiser once he's set up, but you'll have to set up his NPC animations. See the 2D tutorial for this process if you're just getting started.
To animate the mouse, you'll need to use either the Character: Animate Action or the Object: Animate, depending on whether you made your mouse an NPC or not. If you're using Object: Animate, you'll then need to choose which animation type you're using - Legacy, Mecanim, Sprites Unity etc, because the fields beneath it will be depend on that.
Are you relying on Mecanim for your mouse animation? If so, your Action will therefore need to either change a Mecanim parameter that causes the animation to play, or state the name of the animation specifically. If you have trouble working it out, post some screenshots of what you have so far, including the Mouse's inspector.
Try double-clicking your background sprite in the Hierarchy - this should make it come into view within the Scene window.
Select the HalloweenBackground, and have a look in the Inspector. The Transform component will be able to tell you exactly where it is. If you're still not sure, post a screenshot of the full Inspector.