Skip to content

Commit

Permalink
Fix obj delay on_touch
Browse files Browse the repository at this point in the history
  • Loading branch information
SalticHash committed Aug 10, 2024
1 parent 0b6a292 commit 5f24e2c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion code.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"solid": false,
"events": [
{"eventType": "create", "scriptName": "gml_Object_obj_delay_Create_0"},
{"eventType": "collision", "subtypeID": "obj_player", "scriptName": "gml_Object_obj_delay_Collision_obj_player"},
{"eventType": "alarm", "subtypeID": "0", "scriptName": "gml_Object_obj_delay_Alarm_0"}
]
},
Expand Down
1 change: 0 additions & 1 deletion obj_trigger/obj_delay/alarm0.gml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
image_blend = c_gray
self.trigger_targets()
7 changes: 4 additions & 3 deletions obj_trigger/obj_delay/create.gml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ delay = 1;
reset = false;

execute = function() {
image_blend = c_white

// If its counting down, and it has reset off, dont disturb it.
if (alarm[0] != -1 && reset == false)
return

if (delay <= 0)
alarm[0] = 1
else
else {

alarm[0] = (delay * room_speed)
self.set_color(c_white, delay)
}
}

0 comments on commit 5f24e2c

Please sign in to comment.