Eresor's Recent Forum Activity

  • Yes that is right. I do not have a "for each enemy" in any of my events

  • So it's not exactly about enemies dying at the same time that is the problem, it's more of a bug/glitch that's happening.

    So basically, enemies have like a one in five chance of dropping a "Gem", in my game I have an AOE (Area of effect) weapon, and if it kills one enemy that were supposed to drop a gem, all of the enemies killed at the same time will drop gems.

    How can I prevent this? I was thinking maybe destroying enemies at not the same time would help (hence the title), but I'm up for other suggestions!

    Tagged:

  • Ahhh I see. Well that is a shame then.

    It would be nice to have the exit game button to not make the title screen feel more empty than it already is, but I suppose in a further update I will replace it with an Options button

  • Hey, so I've uploaded the first version of my game Astral Hunters, to itch.io.

    Now, I made an exit game button, but it does not seem to work in Itch.io, it worked completely fine in Construct 3.

    Essentially the code I used is quite simple:

    Touch: On touched ExitGameButton: Browser close

    Is there something wrong with Itch.io where it does not want to follow this, or must I do something else?

    eresor.itch.io/astralhunters

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Copy:

    -> Enemies: Set LastShockerUID to ShockerProjectile.UID

    to the 'On collision' event also.

    It worked! Thank you so incredibly much for your help today! I'm extremely grateful!

  • You need to get rid of the first code, it isn't what you want. Otherwise you'd have to post the project, as it isn't obvious what the problem is.

    Alright, here's the link. Sorry that it took so long mega.nz/file/urRhEKiY

    This is the game I've been working on for a while and there are some glitches there, so I'll guide you through so that you can get to what you want to test.

    Start the project either by starting it via Preview Project or start on Layout 2 or 3. If you started via Preview Project or on Layout 2 you need to go to Garage and by scrolling a bit down you'll see a weapon with a little lightning bolt on the top. This is the weapon "Shocker" which is the one you'll use. When equipped you can press the little button in the top right to start the game. You shoot the gun on the left cannon with your LMB, and the right cannon with the RMB. There's also a glitch where the weapons will unequip when restarting a round so if you die you should probably restart the whole project.

  • You need to get rid of the first code, it isn't what you want. Otherwise you'd have to post the project, as it isn't obvious what the problem is.

    I believe I said that I previously tried that, and when I did it would not "bounce" to other enemies, it sat on the same enemy that it hit.

    I will try to send you the game, just give me a moment

  • > You just need to find the closest non-hit enemy then.

    >

    > http://www.blackhornettechnologies.com/Construct3Stuff/Samples/DistanceBounce.zip

    I've tried around a bit now and it still somehow does not work.

    I've copyed your code, the only things that have been changed have been the instance variables to fit mine. Yet somehow something is wrong!

    I've tried deactivating the first code you sent me (like in your most recent code) I've tried putting some code over to the other, I've tried having both of them on, and I've tried everything in between, yet still it sometimes keeps targeting an enemy far away and other wonky stuff.

    It probably has something to do with the functions. I cannot add the function on shooting the weapon because of how I want the weapon to act. I may describe how I want the weapon to act very simply right now:

    I want it to shoot out fast projectiles quickly that go straight ahead (with the Bullet behaviour) and when they hit any enemy while any enemy is nearby it should then "bounce" or rather fly straight to said enemy. They will bounce a few times before destroyed.

    So by this description your code works quite well, and you've done a good job, but I do not see why it does not work for me.

    I'm so very sorry for bothering you so much, and I am extremely grateful for the amount of help you're putting into this, thank you very much.

    Do you have any other ideas to how this could work?

    I also forgot to add a picture of the code, so here it is prnt.sc/uowmq2

  • You just need to find the closest non-hit enemy then.

    http://www.blackhornettechnologies.com/Construct3Stuff/Samples/DistanceBounce.zip

    I've tried around a bit now and it still somehow does not work.

    I've copyed your code, the only things that have been changed have been the instance variables to fit mine. Yet somehow something is wrong!

    I've tried deactivating the first code you sent me (like in your most recent code) I've tried putting some code over to the other, I've tried having both of them on, and I've tried everything in between, yet still it sometimes keeps targeting an enemy far away and other wonky stuff.

    It probably has something to do with the functions. I cannot add the function on shooting the weapon because of how I want the weapon to act. I may describe how I want the weapon to act very simply right now:

    I want it to shoot out fast projectiles quickly that go straight ahead (with the Bullet behaviour) and when they hit any enemy while any enemy is nearby it should then "bounce" or rather fly straight to said enemy. They will bounce a few times before destroyed.

    So by this description your code works quite well, and you've done a good job, but I do not see why it does not work for me.

    I'm so very sorry for bothering you so much, and I am extremely grateful for the amount of help you're putting into this, thank you very much.

    Do you have any other ideas to how this could work?

  • You'd have to post your code at this point.

    prnt.sc/uov9j1

    Here it is!

    The code for the projectile is mostly your code and destroying the projectile

  • Drag the enemies around to see them check if distance is within 200 pixels. The example will just draw lines both ways as there is no optimization to check if a line exists already, but you get the idea.

    http://www.blackhornettechnologies.com/Construct3Stuff/Samples/DistanceWithinFamily.zip

    Alright, so I used your mechanism and it seemed to work quite well, however I have to problems, and they're probably due to me and not you.

    1: Sometimes the projectiles of the weapon seem to target an enemy really far away instead meanwhile some enemies could be a lot closer (not close enough) and not get targeted. How come?

    2: Sometimes the projectiles target the enemy it first hits.

    I use the MoveTo behavior to move the projectiles to the other enemy that is being scanned for (if that makes sense) otherwise the bullet behavior is being used at the start. The problems probably have something to do with the MoveTo mechanic, however I do not know why

  • Drag the enemies around to see them check if distance is within 200 pixels. The example will just draw lines both ways as there is no optimization to check if a line exists already, but you get the idea.

    http://www.blackhornettechnologies.com/Construct3Stuff/Samples/DistanceWithinFamily.zip

    I think I might understand this concept. I will try it in my own game and then report back to you, thank you very much for your help

Eresor's avatar

Eresor

Member since 4 Aug, 2020

None one is following Eresor yet!

Trophy Case

  • 4-Year Club
  • Email Verified

Progress

5/44
How to earn trophies