Forum rules - please read before posting.

Object or animation?

edited May 2015 in Technical Q&A
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

  • Welcome to the forum, @squaleforce!

    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.
  • edited May 2015
    Thank you ChrisIceBox,

    I was able to make the animation but I think I'm missing something since my mouse doesn't move at all (I'm not sure what to put in the actionlist editor).

    Also, I had to save my scene and project. When I opened Unity again, my scene is incomplete (my background is not even showing) but if I play the games, everything is fine.

    I'm using Unity 5 and Adventure Creator 1.45

    I really need your help again please.

  • Are you looking in the Scene Window or Game Window when looking for your scenes?  If you're looking at the Game Window, it may be that the MainCamera is in the centre of the scene, and isn't far back enough to see your scene - just pull it back a bit in the Scene Window and you should be able to see everything again, if that's what's happened.

    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.
  • I'm looking at the scene window and the only things I can see are : MyPlayer and the hotspot for the apple and the mouse but nothing else. When I look at the game window, I see everything so I really don't understand.

    Can you tell me how to send you a screenshot if I don't have an URL for it please?

    As soon as I get that resolved, I will try to make my mouse walk.
  • You can upload screenshots to Imgur.com, or any image-sharing site, and paste the URL in a reply.

    Try double-clicking your background sprite in the Hierarchy - this should make it come into view within the Scene window.
  • edited May 2015
    Even if I double click, nothing comes back.

    I really don't know why after saving it does that to me.

    Here is the screenshot of my scene window : http://imgur.com/gallery/c4aVbrw/new
  • Double-clicking on e.g. HalloweenBackground should show you the location of it in the scene - you'll be able to tell by the 3D axis manipulator, so long as you're in Move mode (the cross-shaped arrows top the top of the Unity 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.
  • Here is a new screenshot since it's still not working.


    Thank you again for your help!


  • Try removing the sprite from the scene and re-adding it.  Otherwise, it may be that your sprite is so small we can't see it - in which case, try increasing the scale by some large number.
  • Deleting the background and re-adding it worked!

    Thank you very much for your help ChrisIceBox
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.