Reaction after shooting at a wall.

0 favourites
  • 6 posts
From the Asset Store
Shoot balls to destroy as many blocks as possible, at each stage the game will become more difficult.
  • This was kinda hard to explain in the title, but here is my problem:

    In my game I want to shoot some stuff at walls and I want a reaction, I need that reaction to spawn at a specific direction, but when shooting down to a corner I have 2 conditions being true at the same time, so I get 2 reactions, any ideas on how to prevent that? here is the .capx:

    dl.dropbox.com/u/41571201/corner%20shoot%20C2-92.capx

    I've already tried with collisions but it didn't do the trick, another problem with this is that sometimes the bullet goes way inside the block and it triggers the reaction inside it too, maybe this does not happen in this little demo, but it does happen in the game -___- any ideas, guys?

    Thanks in advance for the help :)

  • 98 Views and no replies? T___T so there is really no solution?...

  • I don't know what else to say...

    ... other than how about this?

    http://dl.dropbox.com/u/20459682/corner_shoot_FIX.capx

    Basically, I changed the way your events detect completely. Instead of checking the overlap at offset and using hardcoded numbers it'd give you more flexibility to just check where the coordinates are in relation with one another. You'll probably get it more in the capx, but basically there are no hardcoded numbers, as it checks the BeaconBoost's width property and Block's width property, and then it checks for their origins' locations. That way you can resize the block to any size you'd like and not have to recode new conditions to accomodate or use a million block objects. Convenient!

  • First of all: Thanks man! for listening to my cries for help...

    Second of all: I'm having a really hard time trying to understand what you did there... specially the "block.Width / 2 - BeaconBoost.Width / 2" part...

    It's great that the sprites only appear once now! :D but they also appear on the wrong places sometimes, for example, while shooting straight to the wall on the left, they appear right most of the time, but occasionally they point up too, I'm trying to get what you did to be able to tweak this and maybe fix it, but even if I can't, this works way better than what I did before, so: Thank you! I could hug you, man ToT

    And before I go, just in case you read this:

    I think the "block.Width / 2 - BeaconBoost.Width / 2" part is a way of saying "when it just touches the block and goes a bit into it", is that it? I also need the reaction to happen out of the blocks, so I'll have to change that... hope I don't break it T__T

  • The problem with fast moving bullets is that they can end up inside another sprite before a collision is detected. It might be better to use custom movement, then you can set the 'pixels per step' to determine how often it checks for collisions/overlaps.

    (I'm using the free version so had to delete some layers)

    cornerShoot1.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ramones: You, sir... ROCK!

    Thanks a bunch to both of you, guys! I owe you both T-T

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