Colliders.lua: Difference between revisions

Jump to navigation Jump to search
585 bytes added ,  00:36, 12 August 2015
No edit summary
Line 681: Line 681:
!object1
!object1
!object2
!object2
!section
|-
|-
|Determines if two objects are colliding. Numbers can be substituted for objects, which will test against all NPCs with the given ID. Returns the number of detected collisions as a second object. Also returns a table containing pairs of colliding objects, or, if a specific collider was given as an argument, a table containing all objects that collide with that object. The table will be empty if both arguments are specific colliders.
|Determines if two objects are colliding. Numbers can be substituted for objects, which will test against all NPCs with the given ID. Either ID can be given as a table of IDs to test multiple objects at once. Returns the number of detected collisions as a second object. Also returns a table containing pairs of colliding objects, or, if a specific collider was given as an argument, a table containing all objects that collide with that object. The table will be empty if both arguments are specific colliders.
|''boolean,number,table''
|''boolean,number,table''
|''NPC/Player/Animation/Block/Point/Box/Circle/Tri/Poly/number''
|''NPC/Player/Animation/Block/Point/Box/Circle/Tri/Poly/number/table of number''
The object or NPC ID to test with.
The object or NPC ID to test with.
|''NPC/Player/Animation/Block/Point/Box/Circle/Tri/Poly/number''
|''NPC/Player/Animation/Block/Point/Box/Circle/Tri/Poly/number/table of number''
The object or NPC ID to test against.
The object or NPC ID to test against.
|''number'':'''optional'''
Restrict the collision test to a specified section.
|-
|-
!  
!  
Line 695: Line 698:
!object1
!object1
!object2
!object2
!section
|-
|-
|Determines if two objects are colliding. Numbers can be substituted for objects, which will test against all Blocks with the given ID. Returns the number of detected collisions as a second object. Also returns a table containing pairs of colliding objects, or, if a specific collider was given as an argument, a table containing all objects that collide with that object. The table will be empty if both arguments are specific colliders.
|Determines if two objects are colliding. Numbers can be substituted for objects, which will test against all Blocks with the given ID. Either ID can be given as a table of IDs to test multiple objects at once. Returns the number of detected collisions as a second object. Also returns a table containing pairs of colliding objects, or, if a specific collider was given as an argument, a table containing all objects that collide with that object. The table will be empty if both arguments are specific colliders.
|''boolean,number,table''
|''boolean,number,table''
|''NPC/Player/Animation/Block/Point/Box/Circle/Tri/Poly/number''
|''NPC/Player/Animation/Block/Point/Box/Circle/Tri/Poly/number/table of number''
The object or Block ID to test with.
The object or Block ID to test with.
|''NPC/Player/Animation/Block/Point/Box/Circle/Tri/Poly/number''
|''NPC/Player/Animation/Block/Point/Box/Circle/Tri/Poly/number/table of number''
The object or Block ID to test against.
The object or Block ID to test against.
|''number'':'''optional'''
Restrict the collision test to a specified section.
|-
|-
!  
!  
Line 709: Line 715:
!object1
!object1
!object2
!object2
!section
|-
|-
|Determines if two objects are colliding. Numbers can be substituted for objects, which will test against all NPCs with the given ID for the first argument, or all Blocks with the given ID for the second argument. Returns the number of detected collisions as a second object. Also returns a table containing pairs of colliding objects, or, if a specific collider was given as an argument, a table containing all objects that collide with that object. The table will be empty if both arguments are specific colliders.
|Determines if two objects are colliding. Numbers can be substituted for objects, which will test against all NPCs with the given ID for the first argument, or all Blocks with the given ID for the second argument. Either ID can be given as a table of IDs to test multiple objects at once. Returns the number of detected collisions as a second object. Also returns a table containing pairs of colliding objects, or, if a specific collider was given as an argument, a table containing all objects that collide with that object. The table will be empty if both arguments are specific colliders.
|''boolean,number,table''
|''boolean,number,table''
|''NPC/Player/Animation/Block/Point/Box/Circle/Tri/Poly/number''
|''NPC/Player/Animation/Block/Point/Box/Circle/Tri/Poly/number/table of number''
The object or NPC ID to test with.
The object or NPC ID to test with.
|''NPC/Player/Animation/Block/Point/Box/Circle/Tri/Poly/number''
|''NPC/Player/Animation/Block/Point/Box/Circle/Tri/Poly/number/table of number''
The object or Block ID to test against.
The object or Block ID to test against.
|''number'':'''optional'''
Restrict the collision test to a specified section.
|}
|}
271

edits

Navigation menu