Collisions between characters

  • #1, by red363Sunday, 14. February, 01:41 4 months 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

    8 Posts


  • #2, by NigecSunday, 14. February, 11:14 4 months 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

    586 Posts

  • #3, by afrlmeSunday, 14. February, 13:41 4 months 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

    6979 Posts

  • #4, by red363Monday, 15. February, 22:29 4 months 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

    8 Posts

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

    Newbie

    8 Posts

  • #6, by paul-mcphersonFriday, 23. April, 18:55 2 months ago
    Thanks, I had seen it in a tutorial video but couldn't figure out how to use it... 

    Newbie

    3 Posts

Write post