AI Movement For Top Down Shooter

0 favourites
  • 4 posts
From the Asset Store
Contains 601 dynamic, unique, tradecraft movement and transition sounds including morphs, whooshes, swishes, & much more
  • Hello!

    My problem is that, i can't figure out the events for the ai movement.

    it is pretty hard, because its not straght top down, more like RPG style and it uses different animations for every direction.

    I want a simple system when player draws a gun, it alerts individual nearby enemies and they start the shooting cycle.

    global values are

    stance= 0 to 1 (1= meaning when player has drawn a gun)

    alert= 0 to 1 (1= enemy starts following the player)

    path= 1 to 5 (which direction the AI is moving) (5 is random direction because it would not work with "choose 1,2,3,4")

    This is how i got AI to follow the player once "alert" is set to 1

    I cant find any tutorials for this kind of top down shooter action.

    Any help would be much appreciated!

    Thank you!

    Tagged:

  • Is the view isometric then? The 45 view?

    Also, what exactly doesn't work when you play it? What errors occur?

    You could try also using "else" on checking the variables. It may be trying to move in opposing directions at the same event action timing.

  • Hi!

    Thanks for the answer. Yes i think isometric was the word i was looking for.

    Problems are:

    - Enemy movement (cant get bullet behaviour to work, because it rotates the whole animation) only simulated 8 direction movement with global values.

    - They cant behave individually (meaning if one of them shoot, all of them shoot at the same time)

    What behaviours would you recommend for enemy movement?

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok cool so from what I gather, I may be able to help in one direction here.

    If you utilize enemy UIDs or IIDs, you may be able to have more control over who shoots. So, for example,

    If enemy with IID is colliding with the range collision, then if have them shoot. You could loop through UIDs I think naturally with the system events. Hope that makes sense. If ids dont work, check if you can loop an object with multiple instances using a variable. I think you can change a variable independently that way so not all of them will have to shoot. I can help you check that if you like, I can make a simple test.

    As far as bullet behavior, you might need to utilize atan2 (or if not available, angle() or distance()) formulas might work since its iso. Id have to see what its doing now to figure out how to make that work. Q: Is the bullet limited to up, down, left, right for you at the moment?

    For movement, you might want to utilize angles instead of 8 direction

    Hope that is a little helpful so far! I get confused easily so Ill try to keep each post simple. Ill stop here for now :P

    We got this!

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