0 Favourites

Enemey ai for a platformer

  • I am having trouble coming up with how To construct the AI in my platformer. I have 3 enemy types.   1 is a ground type that payrolls a certain spot. I want them to move back and forth but when the player get in range I want them to shoot at them. But I want only a certain number of bullets to be fired.     Second type is a flying unit that will swoop down at the player and drop bombs. Third is the boss who I want to have multiple attacks that they use randomly.   Also is there a way to limit the number of shots on screen. Right now I have the fire button attached to space bar but you can spam the weapon. Thanks for any help. If I need to provide any more details let me know. Sorry if this seems like an easy or stupid question.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Hey Gallis,

    The best thing you can do right now is really break down the behaviour as much as you can. I'll help get you started.

    Enemy 1. You can place 'invisible' sprites on the ground that when he hits will turn him and make him walk the other way.

    Combine this with a distance check - OR - again place invisible sprites at image points on your player at the appropriate distances - and when the enemy touches it order him to fire.

    I know exactly where you are right now - because i was there myself a couple of months ago. The best advice I can give is to scour the HOW DO I forum - Study all the example cap.x's (even if they dont make sense to you right now) and then read the manual. Anything you struggled to understand should make sense at that point.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
134 20,412
KTML5's avatar
KTML5
Unread hot topic
102 11,897
Katala's avatar
Katala
Unread hot topic
0 Favourites
[Effect] 2.5D Platformer
98 14,626
maxlive2010's avatar
maxlive2010