Login / Registrieren
DE EN FR ES IT CZ
Zurück Nach oben

Collisions between characters

  • #1, by red363 5 years ago Zitieren
    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.
  • #2, by Nigec 5 years ago Zitieren
    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
  • #3, by afrlme 5 years ago Zitieren
    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.
  • #4, by red363 5 years ago Zitieren
    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
  • #5, by red363 5 years ago Zitieren
    Nigec, thank you very much, I'll get acquainted
  • #6, by paul-mcpherson 5 years ago Zitieren
    Thanks, I had seen it in a tutorial video but couldn't figure out how to use it...