Forum rules - please read before posting.

Appearing and reappearing objects

Hi, guys! 

I am super new in unity and adventure creator, so I am just trying to figure out everything slowly all what I need for my small game. And the main thing in my game will be appearing and reappearing illustrations in the scene. For example, I need an object appear after the conversation started. I tried to do it with variables, like if the conversation is running, then object becomes visible, if not it should be invisible. But it looks like it is not working. The object is visible all the time no matter what. 
Could you advise me sone solution? 
I am sorry for the dumb question, but I am really in the begging of the unity journey:) 

Thank you! 

Comments

  • Welcome to the community, @Sfera.

    The Object: Set visibility Action can be used to enable and disable Renderer components - this means things like Mesh Renderers (3D models) and Sprite Renderers (2D sprites).

    If you can share some details and screenshots that illustrate the issue, it'll be much easier to help - but I'd first recommend that you get this Action working without variables / checks etc so that we can isolate the issue.

    To do that, simply create a new Cutscene with the above Action, set up to make the object invisible, and run it manually at runtime by clicking Run now in its Inspector.  If it's working OK, then we can move onto having it controlled by a variable or some other means.

    Bear in mind that if the object is controlled by animation, it may be that the animation is overriding the effects of the Action.  As an alternative to changing the object's visibility through this Action, you can also create animations that hide/show it, and play the correct animations back using the Object: Animate Action.

    As for having it hide/show when a Conversation starts, we'll need to be clear on what you're defining as a Conversation.  In AC's terminology, a "Conversation" is essentially the displaying of dialogue options on-screen that the player can choose from.  I'm assuming that you're actually looking to have the illustration hide during the whole sequence, i.e. when the player and the NPC they're speaking to are both talking.

    It may be easiest to simply hide/show the object at the start and end of this sequence.  That is, before you begin the dialogue / conversation, hide the object - and show it again when the sequence is finished.  If you rely on a variable, you'll have to make sure that the variable's value is checked at the appropriate time.

    For more detailed help, however, we'll need to know more about your setup - if you can share details and screenshots to explain exactly what it is you're looking to do, we can try to assist further.
  • Hello! Thank you so much for the answer!

    To clear up my idea, and what I want to do for my game: 
    It is really simple! 
    I want to have some scenes, where player can click on objects and say something about them and I followed your tutorial and did it successfully. Amazing how easy it is with adventure creator! I also need player to click on npc and start the conversation (like adventure creator conversation, because it is the only one I know)  Again, I figured it out using the tutorial. 

    But,I  also want, as soon as player clicks on npc (or object)  to start a conversation (or to say a line) an image (illustration) should come up and the conversation (or the speech line) should go on top of this image, and as soon as it ends the image should disappear and bring us to the scene where player was.

    The illustrations would be just a close ups of the characters or the close up of the action. Like for example, when a player wants to pick up an object or look at it, in games it usually is done by animations, but here I want to replace it with just an images. It should be a highly illustrated game, bacause for now the only thing I can for games is to draw.

    There is no animation (at least for now) I want to figure out this core and simple mechanics I need and then move forward. 
     So I am sure the solution to this idea should be super simple, I am just very new and don’t know any, so I am open to any ideas that will help:)

    Thank you so much for the help! 
  • Let's see some screenshots of what you have so far - as it's not clear what's not working exactly.

    Go back to my original suggestion of creating a new Cutscene that allows you to manually test out the display of a sprite object:

    1) Add a sprite to your scene, and add the Remember Visibility component.
    2) Set its Visibility on start to Off.
    3) Create a new Cutscene and add the Object: Visibility Action to show this sprite
    4) Add an Engine: Wait Action of 1 second.
    5) Add another Object: Visibility Action to hide the sprite
    6) Run the game, and manually run the Cutscene via the Run now button.  Does the sprite show?  Again, as this is a visual problem it really will help to see your setup.
  • Thank you for the instructions! 

    It is more a question how to do what I want to have in my game, rather then a problem. Because I am new and open to any ideas. That is why I don’t have actuall screenshots to show. 
    But I will try to do what you suggested and if I’ll have a problem, I’ll send screenshots. 

    Thank you!)
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.