Category:Gamevar manipulation - EDukeWiki

Help

# Category:Gamevar manipulation

From EDukeWiki

gamevar <varname> <value> <flags>

A gamevar is a game variable that can be used to store numerical data which can then be referenced between actors.

A gamevar's flags determine how it is referenced by the game. A gamevar with flags of 0 is known as a global variable. A global variable exists once in the code, and any time a global variable is set, the new value is seen by all actors. A gamevar with flags of 1 is a per-player variable. Per-player variables exist once per player in the game, with each player having their own copy of the variable. A gamevar with flags of 2 is a per-actor variable. A per-actor variable exists as many times in the code as there are sprites in the map. Each sprite has its own copy of a per-actor variable in memory.

A gamevar value has a range of -2147483648 (-231) to 2147483647 (231-1), also known as a signed 32-bit integer.

- ifvar conditions
- gamevar operators

Name | Number | Description | Page where such variables should be listed
--- | --- | --- | ---
GAMEVAR_FLAG_GLOBAL | 0 | global variable; this is the default |
GAMEVAR_FLAG_PERPLAYER | 1 | per-player variable |
GAMEVAR_FLAG_PERACTOR | 2 | per-actor variable |
GAMEVAR_FLAG_USER_MASK | 3 | bitmask controlling what flags can be set from con; only flags less than this can |
GAMEVAR_FLAG_DEFAULT | 256 | allow override |
GAMEVAR_FLAG_SECRET | 512 | don't dump... |
GAMEVAR_FLAG_NODEFAULT | 1024 | don't add to 'default' array. |
GAMEVAR_FLAG_SYSTEM | 2048 | cannot change mode flags...(only default value) |
GAMEVAR_FLAG_READONLY | 4096 | values are read-only (no setvar allowed) |
GAMEVAR_FLAG_INTPTR | 8192 | plValue is a pointer to an int | Constantly updated gamevars
GAMEVAR_FLAG_SYNCCHECK | 16384 | check event sync when translating |
GAMEVAR_FLAG_SHORTPTR | 32768 | plValue is a pointer to a short | Constantly updated gamevars
GAMEVAR_FLAG_CHARPTR | 65536 | plValue is a pointer to a char | Constantly updated gamevars
GAMEVAR_FLAG_NORESET | 131072 | var values are not reset when restoring map state |
GAMEVAR_FLAG_SPECIAL | 262144 | flag for structure member shortcut vars |
GAMEVAR_FLAG_NOMULTI | 524288 | don't attach to multiplayer packets |

All of the commands in this category are commands that alter the value of one or more gamevars in some way, as opposed to commands which alter sprites, sectors or walls.

## Subcategories

This category has the following 3 subcategories, out of 3 total.

### C

- ► Constantly updated gamevars‎ (36 P)

### G

- ► Gamearray manipulation‎ (8 P)

### P

- ► Pre-defined gamevars‎ (32 P)

## Pages in category "Gamevar manipulation"

The following 78 pages are in this category, out of 78 total.

### A

- Addvar
- Addvarvar
- Andvar
- Andvarvar

### C

- Calchypotenuse
- Cansee
- Canseespr
- Constantly updated gamevars
- Cos

### D

- Displayrand
- Displayrandvar
- Displayrandvarvar
- Divvar
- Divvarvar

### G

- Gamevar
- Gamevar operators
- Getactor
- Getactorvar
- Getangle
- Getinput
- Getplayer
- Getplayervar
- Getprojectile
- Getsector
- Getthisprojectile
- Gettspr
- Getuserdef

### H

- Hitscan

### I

- Ifvar conditions
- Ifvarand
- Ifvare
- Ifvareither
- Ifvarg
- Ifvarl
- Ifvarn
- Ifvaror
- Ifvarvarand
- Ifvarvare
- Ifvarvareither
- Ifvarvarg
- Ifvarvarl
- Ifvarvarn
- Ifvarvaror
- Ifvarvarxor
- Ifvarxor

### M

- Modvar
- Modvarvar
- Mulscale
- Mulvar
- Mulvarvar

### O

- Orvar
- Orvarvar

### P

- Pre-defined gamevars

### R

- Randvar
- Randvarvar
- Readgamevar

### S

- Savegamevar
- Sectgethitag
- Sectgetlotag
- Setactorvar
- Setinput
- Setplayer
- Setplayervar
- Setprojectile
- Settspr
- Setuserdef
- Setvar
- Setvarvar
- Shiftvarl
- Shiftvarr
- Sin
- Spgethitag
- Spgetlotag
- Sqrt
- Subvar
- Subvarvar

### X

- Xorvar
- Xorvarvar

Retrieved from "http://wiki.eduke32.com/w/index.php?title=Category:Gamevar_manipulation&oldid=10869"
Category:

- All commands