DiabloOvermind's Forum Posts

  • Last bump : I DID IT !!

    I followed blackhornet 's capx, but at first I chose the base event to be "on bullet spawned" instead of "on turret shoot" But now its all good, now I have to redo everything on the actual game -_- but im very happy, thank you very much guys !

    99Instances2Go => figured that out litterally 2 minutes ago

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey guys, bump.

    Tried several things, and could not get the game to pick the right bullets.

    Here is my capx file : dropbox.com/s/yd6i2sm4u2mh8 ... .capx?dl=0

    click the tower to select it, then you can upgrade it clicking "upgrade" button. You can also create new instances of the same tower by clicking "create".

    I need the bullets coming from each different instances of the same turret to have different damage values.

    ANy help would be greatly appreciated. Thank you <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" />

    EDIT : cannot post urls... heres printscreen instead :

  • Why so difficult ?

    Upgrade the towers. Including an instance variable for damage done by a bullet. Bullet has instance variable damage.

    Right after spawning the bullet set its instance variable to the (up-gradable one) from the tower.

    Compare on impact.

    This would make sense if I only had a single tower, no ?

    If I create additionnal similar towers once the game is launched, I need to associate bullets to their parents tower in order to make a difference between bullet powers, fired by different towers with different power values. Im working on this right now.

  • Hi blackhornet

    Thank you so much for your reply ! I had a look on the finished product without looking a lot at the events yet, because I am trying to figure out things myself (as I wait for the answer), and Im actually pretty close !

    I managed to select any turret I want (whether it has been created before or after start of layout), I managed to upgrade the "strength" of any turret I want independently, and now I'm just starting trying to apply "instance turret strength value" to "spawned bullet from same instance tower damage value".

    However, I still have some trouble understanding the difference between "=" and "<>", but I do understand there is a difference between them, since "=" doesnt work and "<>" does work when I am clicking on a tower to select it, using a global variable "SelectedUID" set to the selected tower UID, and a boolean for towers to make the difference between a selected tower and the rest.

    Another thing I have trouble with is the difference between "pick instance BY COMPARAISON" and "pick instance BY EVALUATE"... Any light on that matter would be absolutely delighful.

    I did notice the "ParentUID" value in your event sheet, this might be the key to my upcoming challenge.

    I will try to manage this myself for now, and if I really cannot do it, I will explore your event sheet. Copying things does not mean understanding it, and if I really want to be good at using this software, I need to understand it thoroughly.

    But thank you so much for your answer, you demonstrated exactly what I wanted to do !

  • You don't need the bullets in a container. Spawn the bullet and store the turret's UID, so you can pick it again in the future when you need to reference the master object (turret).

    Hmmm Im afraid I dont quite understand that. Im very new to this software... Could you explain a little bit for me please ?

    Thank you

  • Hi SupWithThat?

    Thank you for you answer. This is a solution indeed, however this would mean having as many bullets objects as I have of levels of power, times the numbers of turret I will have in the future, which could be maybe 10 (no idea yet), resulting in hundreds of bullets and hundreds of events...

    Not suitable i'm afraid. But thanks for your reply !

  • 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."

  • 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.