How do I don't shoot when touching objects

0 favourites
  • 6 posts
From the Asset Store
Surena Touch
$2.50 USD
A wrap from official Touch plugin to export touch/mouse input to other plugins.
  • Hi all,

    I am working on mobile game where the Hero can choose bullet color to shoot down specific color enemy. Game is top-down shooter. The problem is with selecting color and shooting. I have 4 color cubes on which touched i choose specific color, but at that time my hero shoots on that way, because with touch on anywhere on screen hero spawns the bullet that way. At first I selected double touch to spawn the bullet, but that isn't easy for player, so it would be better if shooting can happen with single touch.

    Could there be any way how to fix this problem, so my hero won't shoot when I touch any of the cubes when select color?

  • The best way I can think of is to make an invisible rectangle around the colored boxes (so you get a margin to touch)

    Then in the event where you say on touch > fire bullet make a second condition

    is NOT overlapping with invisibleBox

    So now it's touch anywhere - except for the box

  • is cube touch action disable bullet

    is cube not touch enable bullet behaviour

  • fm4fanAT I somehow don't know how to make NOT overlapping object, because there is Overlapping object, and with invert it didn't worked.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • This works: add a red square to the Ghost Shooter demo, and switch to Touch. No bullets fire if you press the red square.

  • blackhornet Thank you very much, I couldn't find Else event before.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)