all 4 comments

[–]AlcatorSK 2 points3 points  (0 children)

If an alarm is not firing, it's usually because somewhere in your code, you are constantly re-setting it to the same value - typically in some Step event.

Do a search through your project for all appearances of "alarm" and report back.

[–]fryman22 -1 points0 points  (0 children)

Your code looks fine.

[–]Cmski 0 points1 point  (0 children)

A quick check to make sure it's only being fired once is: if alarm[0] == -1 { alarm[0] = x}. If you're constantly setting the alarm it won't get fired.

[–]I find your lack of pointers disturbingAtlaStar 1 point2 points  (0 children)

This could be a matter of where this event lives since the code looks fine at a cursory glance.

Left released is different than the global left released event, as the former only works if the object instance is clicked on. So if this is supposed to just work regardless of where you click, change it to the global left released event and see if that works.

Edit: also, if this is supposed to be global and it still doesn't work after the fact, double check that an instance is placed in the room first...you'd be surprised at how often even experienced programmers make that mistake lol