|
player - a player ID, or 0 with no session name$ - a button named with DefineSharedButton |
|
Returns how many times a player has pressed a button since you last asked. Every press is counted on the player's own copy and the count travels with each input frame, so a tap between two of the server's frames, or in a frame that was lost, is still counted once. Asking resets the count for that player and button, so ask in one place, such as your movement code. On a server room's server it counts that player's presses, a bot's included. On any other copy it counts this copy's own presses for SharedLocalPlayer() - 0 with no session - and returns 0 for everyone else. For the full story - server rooms, hosting, sharing and host migration - see the Shared World guide and its complete Shared_World_Playground.bb sample. See also: SharedButtonDown, DefineSharedButton, SetSharedButton, SetSharedBotButton. |