Set attack intervals

0 favourites
  • 6 posts
From the Asset Store
126 vocal sound effects interpreted by three different actors divided in: Dialogues, attacking, dying, pains, emotions
  • I've been reading threads and tutorials for several hours but I can't find an answer to this.

    I'm making a tower-defense kind of game.

    When a MOB get's to a "base" I want it to start attacking the base.

    When it's within X pixels, attack... then wait, then attack again.

    (Ultimately, I also want them to attack other nearby structures/MOBS, but I'll be happy to get this going for now.)

    This seems easy enough, but I'm not finding the answers I'm looking for.

    Thanks!!!!!

  • The mob will attack the base?

    Maybe create invisible carpet on attack place (to avoid within X pixels).

    Conditions:

    mob is overlapping "AttackPlace"

    system every x seconds       

    Actions:

    mob set amimation to "Attacking" (play from beginning), system substruct from "BaseHP" 1

  • There isnt a way to set this up to have it attack anything thats within X pixels?

    If monster is within 10 pixels of RedBase, attack, then wait 1.5 seconds and attack again, and keep doing this....

  • Ok, how about to do "invisible carpet" over the mob +10 pixels in width and height to mob's size.

    And conditions:

    mob_carpet is overlapping "RedBase" (mob_carper on conclusion with "RedBase")

    system every x seconds

    ...

    But I'm not sure I'm understanding you.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • try something like this.

    Condition:

    -Every x Second

    --for each Mob

    ---Distance(Mob.x,Mob.y,Structure.x,Structure.y) < (Your pixel distance)

    Action:

    -Mob Attack

  • try something like this.

    Condition:

    -Every x Second

    --for each Mob

    ---Distance(Mob.x,Mob.y,Structure.x,Structure.y) < (Your pixel distance)

    Action:

    -Mob Attack

    it's better...

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)