Collisions between characters

  • #1, by red363Sunday, 14. February, 01:41 2 weeks ago
    Hello dear friends!
    There was a question and I don't know how to solve it. The essence:
    Player character is being chased by npc.
    It is necessary that when the npc (opponent) intersects with the player's character, for example, he loses. I can't figure out how to implement this.
    If this can be implemented using LUA, could you please post an example of such a script? Thank you in advance.

    Newbie

    3 Posts


  • #2, by NigecSunday, 14. February, 11:14 2 weeks ago
    Visionaire has box2D intergrated so it is possible to do collisions, there was an example on the Discord channel by Esmerelda using the Visual Scripting system, there's items falling and a simple pong example for something colliding

    if you get on Discord search for pong.zip wink the other file is just above that one

    Key Killer

    584 Posts

  • #3, by afrlmeSunday, 14. February, 13:41 2 weeks ago
    The chase character action part also has a built in method for dealing with when the chasing character enters the specified radius. It will let you call whatever action you link to it.

    Setting up accurate collisions instead of radius rect (box) would be a lot more complicated to implement, especially for characters seeing as they consist of constantly changing sprites instead of being static.

    Imperator

    6935 Posts

  • #4, by red363Monday, 15. February, 22:29 2 weeks ago
    The chase character action part also has a built in method for dealing with when the chasing character enters the specified radius. It will let you call whatever action you link to it.
    Thank you very much, did not know about it

    Newbie

    3 Posts

  • #5, by red363Monday, 15. February, 22:31 2 weeks ago
    Nigec, thank you very much, I'll get acquainted

    Newbie

    3 Posts

Write post