Structure access: Difference between revisions
Jump to navigation
Jump to search
Hendricks266 (talk | contribs) No edit summary |
Fixed typo, there were two getuserdefs at the top of the page. |
||
Line 4: | Line 4: | ||
set<struct>var[<id>].<[[gamevar]]> <value><br> | set<struct>var[<id>].<[[gamevar]]> <value><br> | ||
getuserdef .<[[Members of the userdef structure|member]]> <[[gamevar]]><br> | getuserdef .<[[Members of the userdef structure|member]]> <[[gamevar]]><br> | ||
setuserdef .<[[Members of the userdef structure|member]]> <value><br> | |||
The '''get''' commands fetch one of the [[Full list of structure members|members of a structure]] into a [[gamevar]]. | The '''get''' commands fetch one of the [[Full list of structure members|members of a structure]] into a [[gamevar]]. |
Revision as of 16:22, 22 February 2014
get<struct>[<id>].<member> <gamevar>
set<struct>[<id>].<member> <value>
get<struct>var[<id>].<gamevar> <gamevar>
set<struct>var[<id>].<gamevar> <value>
getuserdef .<member> <gamevar>
setuserdef .<member> <value>
The get commands fetch one of the members of a structure into a gamevar.
The set commands assign the value provided to the member.
The commands with the "var" suffix are used to access custom members for a struct, which are really just that ID's gamevars which have the per-<struct> flag set. So setactorvar[THISACTOR].temp 0
is the same as setvar temp 0
.
Struct | ID type | -var? | Description | Notes | |
---|---|---|---|---|---|
actor | sprite id | Yes | sprites and hittypes | You can use THISACTOR as the id for current sprite. | |
tspr | sprite id | No | sprites' display properties | Can only be used within EVENT_ANIMATESPRITES on sprites with mdflags containing flag 16. You can use THISACTOR as the id for current sprite. | |
projectile | tile number | No | projectile types | ||
thisprojectile | sprite id | No | individual projectiles | You can use THISACTOR as the id for current sprite. | |
sector | sector id | No | sectors, floors, and ceilings | You can use THISACTOR as the sector id for the sector in which the current actor is in. | |
wall | wall id | No | walls | ||
player | player id | Yes | players | The player id is usually THISACTOR, but screenpeek and myconnectindex are technically possible. | |
input | player id | No | input | Generally used within EVENT_PROCESSINPUT. The player id is usually provided by THISACTOR. It is unknown whether other values are useful or applicable. | |
userdef | (none) | No | user preferences, game state | Brackets are not required. |