What is the best way to fix this problem?
therobinsonbros@gmail.com
Member Posts: 34
I'm making one of those hidden object game, and I want to add a 3 strike rule when you touch on a empty space. So when you find the object and touch it, everything is cool, but when you touch on something that's not the object you're looking for. You would get a one X . If you get 3 X's game over.
Right now I have it were when i touch on an empty space I get a X but when I touch on the object I still get an X.
Right now I have it were when i touch on an empty space I get a X but when I touch on the object I still get an X.
Comments
make a integer attribute (for now I call it game.integer)
inside the object you want to find first place a rule
if game.integer = 0 AND touch is pressed
change game.integer to 1
also place all the other behaviors you want here (maybe something like change position or destroy)
--otherwise
if game.integer /= (is not equal to) 0 AND touch is pressed
get an X
in the object you want to find next place this
if game.integer = 1 AND touch is pressed
change game.integer to 2
also place all the other behaviors you want here (maybe something like change position or destroy)
--otherwise
if game.integer /= (is not equal to) 1 AND touch is pressed
get an X
etc.
probably not the best way to do this but this should be a way (didn't tried it )
✮ FREE templates at GSinvention ✮
✮ Available for hire! support@gsinvention.com ✮
If you could show how your rules are set up or a picture of them, then people would be able to help faster instead of throwing out suggestions to you. Just FYI for the future to get help faster.
Make an attribute Boolean called hidden.
In the hidden object make a rule
Rule
When touch is pressed
Change attribute HIDDEN to true
Otherwise
Change attribute HIDDEN to false
Now in an actor off scene make a rule
Rule
If HIDDEN is false If touch.count > 0. If strike is < 3
Change strike to strike +1
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS