Find a good method to solve this problem

cmzcmz Member Posts: 46
edited June 2012 in Working with GS (Mac)
make a maths game
attributes name:event1 event2 event3 `````ect
if event1 is 1 4 6 8 9 11 23 56 98(any of the number), attribute named "mission1" can be open.
if event2 is 2 3 5 6 7 89 99 74 223,attribute named"mission 2" can be open
I use the foolish method to do that ,it make the true machine run too slow.
Photobucket
I think there are many good method to solve.Friends, if you have a good idea ,please tell me in detail
Thanks!

Best Answer

  • simo103simo103 Posts: 1,331
    Accepted Answer
    @cmz .. still think you can do it. When getting ready to trigger the check put a change attribute Game.Answer (text) to "!"..number.."!"

    then do if game.event1 contains game.answer

    which will be doing this:

    does this: !1!4!6!8!9!11!23!56!98! contain this: !23! answer is yes

Answers

  • simo103simo103 Member, PRO Posts: 1,331
    @cmz .. if you put the values into a text attribute you could wrap the answer in !6! for example and then say if game.event1 contains !6! then game.do is true

    Event1 would be a text attribute also and look like this !1!4!6!8!9!11!23!56!98!
  • cmzcmz Member Posts: 46
    @simo103
    Maybe can't. the number has its rule,

    Because I must touch different actor,Tap each can get 1 point.At first the number is 0, if "touch" is "pressed" ,change attribute number=number+1.
    The numbers"1 4 6 8```" should be integer

    #-o
  • jckmcgrawjckmcgraw Member Posts: 647
    @cmz

    If they need to be an integer, then I believe you would have to go with your original way.

    Jack
  • cmzcmz Member Posts: 46
    @simo103 you are very clover! It is really done =D>
  • simo103simo103 Member, PRO Posts: 1,331
    edited June 2012
    @cmz ... thanks but not my trick, tshirtbooth uses the technique in his 'word checker' free template so credit to him, but happy to help, good luck with your project :D
    you are very clover!
    :D thanks also .. but I like to think of myself as a daisy ... lol!
Sign In or Register to comment.