How to let state last for 3 sec ?

WeiyuWeiyu Member Posts: 216
edited June 2016 in Working with GS (Mac)

Hello everyone!

I have a problem about let state last for 3 sec.

I want to do like this : http://imgur.com/jgl4Eh0


this is my GS:

《Y》

When actor overlaps or collides with actor of type "A"
Do Change Attribute set "game.Color" to "true"

else
Change Attribute set "game.Color" to "false"

《A》

When Attribute if "game.Color" is "true"
Do Timer For "3" Sec
-Particles

Comments

  • IceboxIcebox Member Posts: 1,485
    edited June 2016

    Ops sorry my bad I deleted this post , it should work the way u do it .. I just tried it

    Do you destroy your coin ?

  • SocksSocks London, UK.Member Posts: 12,822

    @mme5566123twww said:
    Hello everyone!

    I have a problem about let state last for 3 sec.

    You've not said what the problem is.

  • WeiyuWeiyu Member Posts: 216
    edited June 2016

    I am sorry I didn't say it clearly.

    This is my file:
    https://drive.google.com/file/d/0B_Kt_DaoLKbhZkJKeVlMN0hVckE/view?usp=sharing

    But it have very many bug. And one of bug my Actor can't repeat change state.

    I want to do that when Actor touch Y can change myself Attribute. (change self color (Particles), self speed+300 and when Actor touch coin , can +3 Score point.)

  • WeiyuWeiyu Member Posts: 216

    This is my problem GIF : http://imgur.com/ZCaorYr

  • IceboxIcebox Member Posts: 1,485
    edited June 2016

    You have actor Y destroyed before it even changes game.color to false , game.color to false is in the otherwise section , so the game.color goes true once and remains true cause you destroy the actor when its true. Thats why the rule only trigger once.

    go to actor Y remove otherwise section( change game.color to false)

    then go to your actor , remove the timer from particles and do this

  • WeiyuWeiyu Member Posts: 216

    @Icebox said:
    You have actor Y destroyed before it even changes game.color to false , game.color to false is in the otherwise section , so the game.color goes true once and remains true cause you destroy the actor when its true. Thats why the rule only trigger once.

    go to actor Y remove otherwise section( change game.color to false)

    then go to your actor , remove the timer from particles and do this

    Thank you for your help :D

Sign In or Register to comment.