AnD4D's Recent Forum Activity

  • Thanks for your help sqiddster! I'll keep having a go, and will post if I have any luck!

  • What about having everything shrink instead of growing. That way you dont need to worry about zooming. Then, if your npc creatures scale is too small, destroy them.

  • sqiddster The idea was to have a space ship that could move around freely. The player ship's turrets would shoot the enemy weapons if it got within a certain range. I was thinking of basing it on vector rather than speed, as the turrets didn't have movement (so to speak) even though they do move.

    I've tried it with Ashley / code, but they all seemed to aim *dumb*.

    If the ships were just moving I could base the speed, etc off of the ship... but as you said, it's the rotation that seems to mess things up.

    This one got us beat? <img src="smileys/smiley11.gif" border="0" align="middle" />

  • I've still not had any luck - you sqiddster?

    I've made it less accurate, but not smooth (it's very shaky). I'll figure that out next :)

  • Sorry, not 100% sure what you mean, but please find the attached. I've set it so that the layout rotates 1 degree every tick. If you want, you can change it so that at the start of the layout, it is just set to a certain angle.

    CAPX here

  • Hello, back again.

    I got the system working properly with the targeting, however, I then thought about having the enemy able to target the weapons on the ship to disable them.

    This caused an issue in the sense that the turrets do not actually have their own speed or moving angle, as they are pinned, or simply always set to a certain position of a moving object, which is then moving around on its own. I considered having a variable on the item which reads off of the moving sprites speed/moving angle, and then feeding that into the turrets. However, if the sprite is rotating, the turret speed is increased even more.

    Please click here to see an example...

    You can move the blue targets around using the arrow keys, and you should see that they are always being hit... however, if you move them right off screen, the pink target is very rarely hit.

    Is there a way to improve this using method, as it only uses one variable (at the moment) and only a couple of lines.

    Would be greatly appreciated.

  • Wow, Yann! That's impressive stuff! I was trying to think of ways of making sqiddster's code less accurate so the AI isn't such a brilliant shot all the time. Definately appreciated :) Thank you!

  • sqiddster - tried that with closest family member (sounds odd). The aiming process worked as normal, but it remained targeting the first sprite, no matter which one was closest. Should I be using a distance condition instead?

    https://dl.dropbox.com/u/50465867/Construct/Targetting.capx

    *SCRATCH THAT* me being stupid! Missed the positioning section at the top. Also changed it so that it rotates towards, rather than pops direction. Brilliant formula Sqiddster!

  • Try Construct 3

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

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

    Great example sqiddster!

    Any idea how to have it select multiple targets from the same family, allowing us to have the unit target the closest enemy, or the enemy with the lowest health?

  • Darkflame Thanks for sending it through!

    The great thing about Construct 2 is that there are so many ways to achieve the same thing.

    https://dl.dropbox.com/u/50465867/Construct/Smash%20Tv.capx

    Give this a go, and let me know if you need help understanding it. Also, please note that event order is important. Make sure your character changes direction and THEN shoots, otherwise it will fire before chaning direction <img src="smileys/smiley1.gif" border="0" align="middle">

  • Post a capx, tag me in the post using followed by AnD4D and I'll help you out <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Is this plugin still being supported? I'm loving it so far. Very easy. Looking for the tank example. I'm trying to have a NPC navigate and look where he's walking. Struggling with that part so far.

AnD4D's avatar

AnD4D

Member since 4 Nov, 2011

Twitter
AnD4D has 3 followers

Connect with AnD4D

Trophy Case

  • 13-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies