Please Help, i'm a Noob.

Hi!! I am making a hidden object game, so far everything is going well. The issue I am having now is that: I have an object and the name of the object that I want to both disappear from my game screen when the object is found/touched. How do I make them both disappear at the same time? HELP!!!!!! please. TY

Comments

  • bob loblawbob loblaw Member, PRO Posts: 793

    you need to be more specific. are you talking about text within an actor? are you talking about two separate actors?

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    (1) Add the display text for the name of the object to the object actor instead. Set it’s offset position so that it appears below (or wherever you want) the actor.

    Or

    (2) assign the object actor and the label actor a unique ID (integer attribute) that matches for each pair. When the object actor is to be hidden/destroyed, have it change a game attribute to its own ID. Have a rule in the label actor that says if self.ID=game.ID then hide/destroy.

    You’ll find option #1 is a lot easier to manage!

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • mismatchedmisfitzmismatchedmisfitz Member Posts: 8
    edited December 2019

    Great! Thanks Tatiang! To set that offset position, would I do that from within the display text box by playing around with the Horizontal and vertical positions?

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited December 2019

    @mismatchedmisfitz said:
    Great! Thanks Tatiang! To set that offset position, would I do that from within the display text box by playing around with the Horizontal and vertical positions?

    Yes! For example, if your actor is 60 pixels high, you might choose to offset the vertical position by negative fifty pixels, 30 from the center of the actor to the bottom of it (30 is half of 60) and another 20 to place it slightly below that. Obviously, it will differ depending on what your actor's image is and how far you need the label offset. Setting the offset value to "relative to actor" will position it relative to the center of the actor.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • Got it, thanks!

Sign In or Register to comment.