DiabloOvermind's Recent Forum Activity

  • Hi guys, here's a hard one :

    I'm trying to create a Tower Defense game.

    Currently, I have only one type of turret possible, the basic gun turret with a turret behavior, which shoots bullets with a bullet behavior. So far so good.

    As in 99% of Tower defense games, you may place more than one of the same turret type, right ? Right.

    But I also would like to be able to upgrade my turrets individually, and not all the same turrets of the same type at once.

    So I have to create a container with all upgrade buttons I have, and associate them with my tower, to make each same upgrade buttons associated with their own tower, and all distinct from each others, right ?

    This way, every single tower (of the same type) will have its own upgrade options, and their variables will be independent too (range, speed, power, etc...)

    ______________________________________________

    Now comes the hard part : The only way I can think of to upgrade bullet power is to set a variable somewhere (supposedly inside the bullet) that reduces the enemies life by the value of that variable, which represent the damage the bullet does. Which mean I need the bullets to be in the same containers as the turrets, because if not, every single bullet is gonna share a single power variable, and upgrading towers individually will work, but not for bullet power, because turret firepower is not relative to the tower, but to its bullet. (stop me if i'm wrong so far)

    BUT ! If I include bullets in the same container as the turret, then the turret is gonna be destroyed as soon as the bullet gets destroyed/another turret may spawn when a turret shoots (spawns) a bullet...

    So I am cornered. No way to make bullets separate from each other in properties without including the tower they originate from in the same container, which creates various problems.

    So here is the question : How do I make my bullets make a certain amount of damage to enemies , depending of which tower they have been fired from ?

    Good luck.... And thank you very much to anyone who will try to help

  • Absolutely. Thank you for your reply

  • solution found :

    "A simple trick is to set the bullet to be invisible on the collision, and also add a check for visibility to the 'On collision' check. Since only the first target checked will have the bullet still visible, only one is eliminated."

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi !

    I am very, very new to this software. My only experience with game making softwares was using The Games Factory about 15 years ago. So, sorry if I post dumb questions !

    I am making a turret defense game with the free version of construct, and will most likely buy the full version soon.

    I have placed my first turret and my first critters, and when testing collisions, my bullets destroys every single critter it collides with, even if it collides with multiples critters at the same time.

    I would like the bullet to destroy only one single critter at a time. I tried to swap on collision with overlapping, I tried to put both of them in the same event condition, I tried to play with collision boxes (1px => 3px => 5px for bullet and only the middle of the critter into the full rectangle being the collision)

    At the moment, critters are not supposed to overlap anyway, but it will happen very soon, so I would like to fix this issue now.

    How can I make my bullet destroy only one sprite at a time when it collides with more than one at the same time ?

    Thank you very much.

DiabloOvermind's avatar

DiabloOvermind

Member since 11 Nov, 2016

None one is following DiabloOvermind yet!

Trophy Case

  • 8-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

10/44
How to earn trophies