MANUAL for GMnet ENGINE and GMnet CORE

htme_globalSet(name,value,datatype)

Description

Stores a real or string value in the global sync list. Use buffer_type to define the type of the variable. The global sync list is a list of global variables that can be retrived via htme_globalGet.

They get synced between all clients and servers and be read and written by any (unlike instance variables which are read-only for all but the creator).

Make sure the player is connected or a server is running!

NOTE: Using this command will sync this variable immediately via SMART

More information: Bonus 2 - Global Sync (Sync a pool of variables editable by all)

Example

var value = 1+1;
htme_globalSet("name",value,buffer_u8);

Arguments

Name type description
name string The name of the variable
value real/string The (new) value of the variable you want to store
datatype real See Buffer type

Returns

Nothing


Back to index.


Creative Commons License

All pages in this manual are licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Manuals / GMnet ENGINE Manual

GameMaker: Studio is owned by YoYoGames. GMnet is not affiliated with YoYoGames.
The GMnet logos use icons from Entypo (http://entypo.com/) and Open Iconic (https://useiconic.com/open/). They are licensed under CC BY-SA 4.0.