Character "build" a block in front of him

Hi am making a sidescroller platformer / puzzle game and i have a question if someone can anwser me plz
i want my character to “fire” a block in front of him and when he fires again to remove this block again
to make it more clear i want instead of shooting when pressing “fire” button to make a block in front of him and when he press fire to make the block disapear

think about something like minecraft in 2d when fire key has 2 actions instead of 1

That’s pretty straight forward.

On fire create a branch and check if a variable of the type “Actor” is empty (equal to none). If it is “Spawn actor of class”. You will get a reference to the newly created character as output. Save that in your variable. If the variable isn’t empty just call “Destroy Actor” on the actor stored in your variable.

Cheers