Joy's Forum Posts

  • That's interesting, will definitely try to implement it a little later when I have more time. Thank you sharing!

  • Thanks for replying. I will probably purchase Construct once I've made sure that everything I want to be able to do in my game is possible, so I'll be able to use Families then.

    In my game, an enemy does collide with a hidden player object when in range, so I guess I just need to trigger a condition that all other enemies of the same type (or in the same Family) will move at least a certain number of pixels away? Again, an example would help a lot, but I understand what you're saying. Much appreciated.

  • Could someone direct me to a tutorial or a forum post that might explain how to make all other enemies in a level stop moving towards the player and wait once one is near the player? I assume it has to do with the system selecting the closest instance of an enemy and then turning off any chase-type behavior on all the others, but it would help if I could see an example to learn from.

    Thanks in advance!

  • Haha, I don't even know how to explain what I don't understand. If coding isn't your thing, everything just stops making sense after a few sentences. I can tell what you're saying is correct, but there's no way I would ever be able to figure any of it out on my own.

    When I get the sprites ripped and can post a more working playable capx, I'll upload it and maybe you can take a look at it and make a few fixes if you have time and wouldn't mind. I think the basic engine itself could be useful for several types of games (like Lethal Enforcers, Nam '75, or Punch Out), but it's just not something I'm going to get right without help.

    Thanks again.

  • I probably am going to have to quit for now because not only do I not quite understand some of your explanation (despite you explaining it all very well), as soon as I put the player's attack animations back in and set up the hit detection, the enemy won't revert to the 'chase' or 'attack' modes after getting hit. It worked in my original capx, but now that the enemy behavior has been rewritten, I don't know what to do to get it working again.

    I can't keep asking every single time I get stuck and I'm not having much luck figuring it out myself. When I can, I'll try to add sprite rips from a similar existing game and make the unfinished capx available here for anyone to try to improve upon or fix.

    Thank you again for your time and expertise!

  • Thank you, that works perfectly. I feel bad that you worked for three hours on it though! Construct is definitely the easiest of the game engines that I've used, but that makes it even more frustrating when something simple doesn't work the way you expect. It's also difficult when you're trying to do something that hasn't been done many times before and can't find a lot of examples to learn from (if only I were making a top-down zombie shooter or platformer!) I'm still not entirely sure why the problem is *not* happening in your fixed capx (was it the direction variable that fixed it?), but at least I can clearly understand what you did here. Great work, I really appreciate it.

    I hope you won't mind if I have any additional questions in the future, but I won't ask until I feel ready to give up again. Thank you very much!

  • You might have done a little more to that capx than four lines of code because putting them in sure didn't work for me. I appreciate the help very much, but this is just getting too frustrating. I don't know why those 'log in console' commands are necessary and I don't really understand why I would have to create my own overlap detection when there are at least two ways (imagepoints and collision overlap) that *should* work. I expected a challenge when it came to enemy AI or complex combos; the fact that I'm stuck dead because I can't get an enemy to stop an animation using logic that I would think makes sense is just silly.

    I'm a graphics guy, not a coder. Think I'll just wait until I can collaborate with someone and stick to what I know. Thank you all very much for your suggestions, I appreciate the time you took to help.

  • Thank you, disabling that does stop it from freezing. However, it also causes the enemy to interrupt it's attack animation to pursue the player if you move out of range during an attack. It is important that the enemy's attack animations are not interrupted because it allows you to avoid attacks and then counter.

    You should be able to see the enemy play out it's full attack animation even if you move the player bounding box out of the way during in the original capx. So far, I have not found a way to be able to interrupt the enemy's walking animation in order to attack, but force any attack animations to play through. No matter where I use "Stop Animation", it only seems to make the enemy freeze.

  • I also searched the forums for the same thing you're asking about, but couldn't find anything. Here's the solution I came up with...I doubt it's the best way to do this, but if you only need a few speeds (like sneak, walk, and run), this should work.

    (edit) the last command was when I started on the move left commands, it's not finished. The first three blocks are for right analog movement.

  • I hate to say it, but it's actually not working properly; if you move away from the enemy once its entered the player's bounding box, it sometimes goes back into its walking animation and then freezes until the player moves back into range. I'm really surprised that something that would seem very simple is so difficult to implement.

    I appreciate your help so far though!

  • Thank you very much for responding and for the capx. It does work, good job! (edit: oh, I guess not, sorry!) I'm not at all familiar with Browser commands though, in fact I had to get an extra plugin before your capx would even open here. Those commands will still function correctly if the game is packaged as a Node-Webkit, correct?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sorry to ask again, but I've had to stop using Construct until I can get this problem solved. If anyone has any ideas, I'd really appreciate hearing them.

  • Anyone? Please, I could really use some advice to try and fix this issue. I was checking tutorials half the night and couldn't find anything that helped.

  • Just want to say thanks to Monitz87 and everyone who has helped with my screwy problems so far. I'm having some new problems that I cannot find solutions for though, and I hope by posting the .capx, it will be easier to figure out.

    This is a rough 'first person fighter', a little bit like Punch Out, but movement is like Dynamite Duke where you can pan the screen and both you and enemies can move. It has a working combo system and other features, but they are not included in this .capx for easier troubleshooting.

    [attachment=0:2hasv9qg][/attachment:2hasv9qg]

    If you play it, you'll see that the player's bounding box (player_bbox) and the enemy_bbox only move along the x axis, and that the enemy is always trying to overlap its box with the player's, at which point it will attack. Everything works well except that when the enemy's bbox does overlap the player's, the enemy's walking animation needs to stop immediately. It doesn't, in fact it continues to play through all of it's remaining frames of animation before attacking. You can see this happening by just moving away from the enemy a little bit and watching the enemy's walking animation frames (it's really clear in the debugger).

    Any help would be appreciated! If I can get this working well enough, I will try to make the basic template and combo system available for everyone to use. Thanks in advance.

  • Yeah, here's the new code.

    [attachment=0:2qofx7iw][/attachment:2qofx7iw]

    The 0.10 Wait commands are actually just so the enemy pauses for a tenth of a second before beginning to follow once the player's bbox is no longer overlapping the enemy's. Disabling them has no effect on interrupting the walking animation.

    (oops, just noticed that the second Else isn't part of the second X check. Fixing it did not have any effect though).