Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Collision problems

Hi, I'm participating in the Ludum Dare competition atm and I've decided to use Construct 2.

I've had no past experience with the program so excuse the noobishness.

My game has the player going around absorbing other 'orbs'. I've set this up to receive a point in a certain variable each time the player absorbs something. However, my problem is that after collision, I can recollide with the object again, thus giving the player more points that intended. It might be a bit difficult to understand so I have uploaded my project for you to inspect.

http://www.mediafire.com/?33w8h14xrj6oj4h

Thanks in advance!
 

onzephyr

Awesome Bro

Pretty much what Tomas said. fast fix is to add an instance variable to each of your 'orbs'. then in the collision event. check to see if the twitch is on ----> do actions and add an action to toggle the switch .

Based on your file it would look something like this.

-----------------------------------------
Player-- On collision with "aggression"
Aggression-- Variable = 0
-----------------------------------------> Player 8direction disabled
-----------------------------------------> aggression solid disabled
-----------------------------------------> aggression start fade
-----------------------------------------> sprite2 start fade
-----------------------------------------> Player 8direction enabled
-----------------------------------------> system add 1 to aggression
-----------------------------------------> aggression set Variable to 1


bonus of the switch is if you ever need to reset an orb for some reason you now have a built in way of doing it.
Good luck with Ludum dare! I'll be joining the chaos as well but won't get a chance to start anything more then pen and paper until later today.
 
Wow, it was that simple...and I was fretting over it for so long too :x I feel very useless now lol

Thank you for the quick responses!

And thanks for the wish onzephyr. Good luck with your game too!
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top