How Do I Recreate The Chaser From Cuphead?

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

  • So in cuphead there's a weapon called the chaser that follows the nearest enemy. I kinda want to recreate that for a game but I want it to target the active that it's nearest to. Tried doing it with qualifier but it didn't work out the way i thought it would.

  • You'll want to have some way of identifying and saving the specific instance of the nearest enemy when the missile is created. Qualifiers will scope all enemies of that class, you want one specific enemy

    You could use an alterable value to identify one enemy, using its fixed ie. So on the code that makes the projectile it could look like this;

    * Upon Pressing {fire key}

    * + Pick "enemy" closest to "player"

    = Create homing missile object

    = Set value A of homing missile to fixed("enemy")

    Now each missile you have will know the fixed ID of the enemy who was closest when it was made. But to make it actually follow that enemy, you'll want code that turns it in that direction. If you have only one missile at at time this is simple, you'd want code like;

    * FixedID("enemy") = value A("homing missile")

    = Homing Missile: Look in direction of Enemy

    But this will only scope one enemy, because that comparison of fixed id :: value a is only occurring once for all objects, using a single missile and finding a single enemy- then all missiles will home in on that same enemy, even if they had different saved targets.

    What you'd want to make each independent missile target a different enemy (if its supposed to) is to iterate through each missile independently with a loop. A for each loop would do great. For example;

    * Always

    = Start For Each Loop "Find Targets" for Homing Missile

    and then

    * On For Each Loop "Find Targets" for Homing Missile

    * FixedID("enemy") = value A("homing missile")

    = Homing Missile: Look in direction of Enemy

    That would go through each missile one by one, compare its value A against all enemies, find the corresponding target and turn towards it.

  • thanks for answering but can i use this with multiple different actives, for example the missile will go towards active 2 if closer than active 1?

    Edited once, last by Memez (March 23, 2023 at 3:14 PM).

  • The "pick object closest to another object" will already specify that. You can find it when doing conditions under object->"pick or count"->Pick closest "object" from another...
    If you have multiple enemy types, you can give them all the same qualifier, then use that qualifier as the enemy you specific in the picking / comparison / aiming code.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!