Indomitus's Forum Posts

  • Wonderful Stain, it worked like a charm! I also made some tweaks and added another timer for the goo, so the hero can be trapped if it touches it as well.

    I didn't know how powerful the timer behavior is. Thanks a lot, cheers!

  • Hello fellas constructors,

    Luckily this is not a medicine question but code!

    I have been working lately on a super hero skill which infects enemies when the hero collides them, leaving a goo that if it's touched (overlapping) by the hero for a second time it will stick him to it till the infection disappears after x seconds.

    I have tried a few codes but always get problems specially when the hero is quite close to the enemy (I think it recognizes the overlapping as a collision) and the infection blinks on and off. Also, I'd like to know how do I achieve this having 12 enemies in the same level, which in most of the cases they won't be all infected at the same time.

    Thanks in advance for any help the community can provide!

  • Hello Robaschi,

    Hope this helps:

    Cheers!

  • Hi R0j0hound, thanks for your fast response!

    How can I achieve that? on the other hand, sending lots of laser won't affect any CPU performance?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello folks,

    I have 2 objects which are connected with a line using a width property, the thing is that one of this objects is moveable and between them both are several obstacles. I'd like to make this line to bounce/reflect off of these obstacles keeping the bound of object A and object B. This will give me and angle and a path which object A should follow to reach object B.

    Here's a screenshot from a file provided by R0J0hound in which I have been working:

    Note that object B (green box) should be the end of the path, therefore the line shouldn't go further than this point, though, it should get longer depending on the number of obstacles in-between that reflect the line.

    Thanks in advance!

  • Hi tgfcoder,

    Sorry for the delay on my response. I'll take a look at your links, and get some inspiration for the code I need. I know this is not an easy task, but very challenging.

    I must say I'm looking forward to develop the code for this kind of AI!

    Thanks a lot mate.

  • Hello there Robaschi,

    What I see here is that you have some overlapped events, you need to be very careful since Construct 2 reads the code lines in the order as they were written, and sometimes the system replaces similar events for the one that has been created at first.

    Try changing the 11th line to "platform is jumping" instead of "Up arrow is down" and let's see what happens.

    Cheers,

  • Hi Robaschi,

    You just need to change the "when the k is down" to "when it's pressed" and add a "trigger once" event at the start of the attack code. Here is the New Capx. Let me know if worked.

    Cheers,

  • Hi Robaschi,

    About the sounds you just need to set up a stop between play times. Here I attached a Capx file as an example, hope it helps.

    Cheers,

  • Bumping this thread. (If by any chance there's already a post -I could have missed- on the forums concerning to this topic, please let me know)

    Thanks in advance!

  • Hi Robaschi,

    First off, welcome to the community!

    Can you provide us a screenshot of the code you're using?

    Cheers,

  • Hi Rennoc,

    Maybe this simple tutorial for character selection can help you approach what you want:

    Good luck!

  • Hello fellas,

    How can I program an AI that can avoid obstacles and try to score using different angle options, e.g. Billiards game.

    The AI on its turn should analyze and consider (between all the balls on its way) if there's any possible way or angle to shoot the ball and score, if not, to shoot it (with a proportional force) in a direction which can place the ball closer to the goal.

    I appreciate in advance any help, once again, thanks!

  • Hi R0J0, after a few days I could solve the formulas and worked like charm!

    Thanks so much for the input, I'm pretty sure this information will be helpful to future constructors.

    Cheers!

  • Thanks a lot R0J0, I look forward to give it a shot.

    Though, I don't want to fix the angle to the right when the ball stops, I'd like to keep the same angle it has before stopping. Maybe the same principle but in reverse mode?