|
name$ - the button's name, such as "jump"; up to 32 bytes, no control characters keys$ (optional) - the controls that press it, separated by semicolons: key names such as space, enter, shift, w or f1, gamepad buttons such as south, east, start or left-trigger, and mouse-left, mouse-right or mouse-middle; none by default |
|
Names a button that players press, and the keys that press it. A button is held while any of its keys is down, or while SetSharedButton holds it. Every press is counted, so SharedButtonHit on the server never misses a tap, even when a packet is lost on the way. On a touch screen, where TouchAvailable is 1, up to 12 buttons with keys also get touch buttons on the right of the screen, and sticks with keys touch sticks on the left, unless the program has touch controls of its own, such as CreateVirtualGamepad makes. A button without keys, which your code holds, gets none. Define every action before starting Shared World, the same way and in the same order on every copy, server included: a client whose actions differ is turned away. A program has at most 16 actions, sticks and buttons together. A server room is a Shared World room whose host is a server: a copy of your game with no player of its own that runs every player's entity, so up to 128 people and bots can play together. Run a copy with B3D_SHARED_SERVER=1 in its environment and HostSharedWorld serves a server room. 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: DefineSharedStick, SharedButtonDown, SharedButtonHit, SetSharedButton, SetSharedBotButton. |