|
|
(7 intermediate revisions by 3 users not shown) |
Line 1: |
Line 1: |
| get<struct>[<id>].<[[Full list of structure members|member]]> <[[gamevar]]><br>
| | #REDIRECT [[:Category:Structure access]] |
| set<struct>[<id>].<[[Full list of structure members|member]]> <value><br>
| |
| get<struct>var[<id>].<[[gamevar]]> <[[gamevar]]><br>
| |
| set<struct>var[<id>].<[[gamevar]]> <value><br>
| |
| | |
| The '''get''' commands fetch one of the [[Full list of structure members|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 <code>setactorvar[THISACTOR].temp 0</code> is the same as <code>setvar temp 0</code>.
| |
| | |
| {| {{prettytable}}
| |
| !Struct!!ID type!!<nowiki>-</nowiki>'''var'''<nowiki>?</nowiki>!!Description!!Notes!!
| |
| |-
| |
| |[[Members of the sprite, hittype, and spriteext structures|actor]]
| |
| |[[sprite id]]
| |
| |Yes
| |
| |sprites and hittypes
| |
| |You can use [[THISACTOR]] as the id for current sprite.
| |
| |-
| |
| |[[Members of the tsprite structure|tspr]]
| |
| |[[sprite id]]
| |
| |No
| |
| |sprites' display properties
| |
| |Can only be used within [[EVENT_ANIMATESPRITES]] on sprites with [[mdflags]] containing flag 16.<br>You can use [[THISACTOR]] as the id for current sprite.
| |
| |-
| |
| |[[Members of the projectile structure|projectile]]
| |
| |[[tile number]]
| |
| |No
| |
| |projectile types
| |
| |
| |
| |-
| |
| |[[Members of the projectile structure|thisprojectile]]
| |
| |[[sprite id]]
| |
| |No
| |
| |individual projectiles
| |
| |You can use [[THISACTOR]] as the id for current sprite.
| |
| |-
| |
| |[[Members of the sector structure|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.
| |
| |-
| |
| |[[Members of the wall structure|wall]]
| |
| |[[wall id]]
| |
| |No
| |
| |walls
| |
| |
| |
| |-
| |
| |[[Members of the player structure|player]]
| |
| |[[player id]]
| |
| |Yes
| |
| |players
| |
| |The player id is usually [[THISACTOR]], but [[screenpeek]] and [[myconnectindex]] are technically possible.
| |
| |-
| |
| |[[Members of the input structure|input]]
| |
| |[[player id]]
| |
| |No
| |
| |input
| |
| |Can only be used within [[EVENT_PROCESSINPUT]].<br>The player id is usually provided by [[THISACTOR]]. It is unknown whether other values are useful or applicable.
| |
| |-
| |
| |[[Members of the userdef structure|userdef]]
| |
| |(none)
| |
| |No
| |
| |user preferences
| |
| |Use [[THISACTOR]] for the id.
| |
| |}
| |
| | |
| [[Category:Structure member documentation]] | |