Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Is it possible to map two actions to a single button (double-press input)?

A topic by Aunitydev created 86 days ago Views: 88 Replies: 2
Viewing posts 1 to 3

Hello! I was wondering if it is possible to map two different actions to the same key. For example, could I program a single press of the spacebar to trigger an attack, while a double-press of that same key triggers a shooting mechanic? Thanks!

Submitted

Yes it is!

Submitted

You could also differentiate between the two actions by checking how long the button was held.