How do I get Platforming A.I. to work properly.

0 favourites
  • 4 posts
From the Asset Store
A pack of 76 platform designs for a platformer game with a mushroom/jungle theme
  • I'm supposed to be doing a gamejam right now, but I've wasted 3 hours being stumped on this issue and figured I need to get some help otherwise I won't finish.

    http://a.pomf.se/qrcznr.png

    Example image.

    I've used the distance method described elsewhere in forum, but it doesn't seem to work. No matter the distance of the player to main android colision boxes, it triggers his movement.

    An oversight in the events?

    Are there better methods?

    With these methods I'd like it to work per instance (so i can have multiple independent enemies) and have them able to shoot and alternatively melee attack when within a small distance of player character.

    Time is of the essence and thankyou in advance for looking. <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

  • You're setting EVERY instance of that object to MOVE or to STOP at the same time, system check don't pick instances. Gowever you have an useless "for each" just bellow that, that should be on top above the events on top =P

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Doesn't really help my main issue/problem at the minute sargas.

    Even with only one guy spawned in-game, it is the same. He doesn't appear to have an invisible circle around him that triggers movement or not.

    Anyone else?

  • You're not being very helpful here,

    You have the distance function dead wrong too.

    you have distance(1.x, 2.y, 1.x, 2.y). you're measuring nothing. of course the event would NEVER trigger.

    you need to input distance(1.x, 1.y, 2.x, 2.y) or distance(charcolision.X, charcolision.Y, policecolision.X, policecolision.Y)

    I'm sorry for not being able to detect such a basic problem on my first try. I hope you can forgive me.

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