1. temporary flashing. 2. touch on whole screen

efishefish Member Posts: 40
edited November -1 in Working with GS (Mac)
Hey!

I'm currently having two problems in my game-creation:

1. I have and actor going back and fourth along the X-axis. This actor has to be stopped at a specific place on the screen. If it is stopped at the correct place, the actor stops and spawns a new actor. If it is NOT stopped at the correct place I want it to flash temporarily for 1 sec. This is where I am stuck.
I have tried using a timer and changing the alpha of the actor with integer function, but I can't get it to work properly. It fades out, but never fades in again.

2. Same game. For stopping the moving actor I want the player to be able to touch anywhere on the screen to stop it. I have therefor made a rule that states if Any: touch inside or outside.. This works pretty well, but the problem I'm having is that it is possible to 'cheat' by just pressing and holding the screen until the actor hits the correct place. Basically what I want it to do is if you have pressed (inside or outside of the actor), the press should be cancelled right away.

Thanks!

Comments

  • quantumsheepquantumsheep Member Posts: 8,188
    efish said:

    2. Same game. For stopping the moving actor I want the player to be able to touch anywhere on the screen to stop it. I have therefor made a rule that states if Any: touch inside or outside.. This works pretty well, but the problem I'm having is that it is possible to 'cheat' by just pressing and holding the screen until the actor hits the correct place. Basically what I want it to do is if you have pressed (inside or outside of the actor), the press should be cancelled right away.

    Instead of 'touch' use mouse button pressed.

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • efishefish Member Posts: 40
    Thanks for the reply.
    That was what I did in the beginning. The problem with that is that I can't specify 'inside' and 'outside', ergo not the whole screen. Is there a way around this?
  • efishefish Member Posts: 40
    That worked very well, thank you! One problem solved:)
  • osucowboy18osucowboy18 Member Posts: 1,307
    Hey efish, glad to hear you got your second question answered. In regards to your first question, I have a template I received from another GS user on how to do a fade in/out properly. I think this would solve your problem. If you would like a copy of the template, just email me at iphoneapps@alexharbaughapps.com.

    - Alex
  • efishefish Member Posts: 40
    Cool:) Email sent. Thanks!
Sign In or Register to comment.