I want to make a system for buttons that when you press them you have 5 seconds until it returns to normal
if you could help me, i am new and i am still learning
GML:
//create event
timerpressed = false
//alarm0 event
timerpressed = false
//step event
if place_meeting (x,y,obj_player){
timerpressed = true
alarm[0] = 300;
}
if timerpressed = false{
sprite_index = botao_unpressed_04
}
if timerpressed = true{
sprite_index = botao_pressed_04
}