How do you make an actor appear...?

christochristo Member Posts: 14
edited November -1 in Working with GS (Mac)
I want to make an actor appear after all 5 items have been found within a scene. I'd like this actor to be what is pressed to go onto the next scene. Does anyone know how to do this?

Thanks!!

Comments

  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Okey I am new to this but I think this should work:

    Create an attribute named collect or something like that (integer) and when your actor collides with your item#1, change attribute "collect" to (collect )+1...........in this case you have to name all your items equal.

    Then drag in the actor you want to appear and change it's colour alpha to 0.
    Add a rule saying: when attribute collect =5

    Change attribute self.colour alpha to 1..

    Hope that helps

    See ya
  • christochristo Member Posts: 14
    Thanks Alex0407 ... just to clarify...

    Do I create the collect attribute for each item within the scene or for the scene itself?
    Do i use the Change Attribute behavior on each item?
    Where do I place the Rule: when attribute collect = 5?

    Sorry for so many questions – thanks for all the help!!
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Ok, I think I wrote it very difficult gg :)

    1) you create the collect attribute just once!

    2) In your actor that collects the items make a Rule saying:

    when actor collides with actor of type "your_item"

    behavior: change attribute "game.collect" to game.collect+1 (! use the expression editor, the small e!)

    If you want that your items disappear after your actor has collected it just add in the item: when collide with actor, behavior destroy

    Last step, in the appearing actor that get's shown when the normal actor has collected all items, change colour alpha to 0. And add this rule:

    When attribute game.collect = 5
    behavior change attribute self.colour.alpha to 1

    Please let me know if it works, if something is unclear just ask again ;)
  • christochristo Member Posts: 14
    You are a big help - thank you!

    I don't have an actor that collects the items - it would be the player touching 5 different parts of a scene – it is a "find the difference" game. How does this change what you said if at all.

    Again, thanks so much!
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    I am not sure but I think this should work:

    In your items say when touch is pressed and mouse position is inside
    change atrribute game.collect to game.collect+1, then behavior destroy the actor.

    when the player has to touch them in a fixed way, just say when first item is pressed change attribute to 1, 2nd item just say change attribute to 2 and so on...

    And if if he can touch in different ways, just say in !each! item:

    touch is pressed and mouse is inside, change attribute game.collect to game.collect+1

    Thats it ;)

    see ya
Sign In or Register to comment.