How do you make an actor appear...?

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!!
Thanks!!
Comments
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
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!!
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
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!
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