Collisions between characters

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

    Forum Fan

    101 Posts


  • #2, by NigecSunday, 14. February 2021, 11:14 3 years 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

    627 Posts

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

    7278 Posts

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

    Forum Fan

    101 Posts

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

    Forum Fan

    101 Posts

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

    Newbie

    3 Posts