rename Trigger to Sensor

This commit is contained in:
MihailRis
2024-07-09 07:37:20 +03:00
parent 0a14d6220a
commit c94c2697e7
11 changed files with 93 additions and 93 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
"drop"
],
"hitbox": [0.2, 0.125, 0.2],
"triggers": [
"sensors": [
["aabb", -0.2, -0.2, -0.2, 0.2, 0.2, 0.2],
["radius", 1.6]
],
+2 -2
View File
@@ -71,7 +71,7 @@ function on_fall()
inair = true
end
function on_trigger_enter(index, oid)
function on_sensor_enter(index, oid)
local playerentity = player.get_entity(hud.get_player()):get_uid()
if ready and oid == playerentity and index == 0 then
entity:despawn()
@@ -83,7 +83,7 @@ function on_trigger_enter(index, oid)
end
end
function on_trigger_exit(index, oid)
function on_sensor_exit(index, oid)
if oid == target and index == 1 then
target = -1
end