Getplayer: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
.
Automatically fixing double redirect from Structure access to Category:Structure access in a maintenance job
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This allows you to fetch the value of one of the [[members of the player structure]] to a [[gamevar]].
#REDIRECT [[Category:Structure access]]
 
getplayer[<player id>].<member> <gamevar>
 
The player ID can be either [[THISACTOR]], [[screenpeek]] or [[myconnectindex]], though using myconnectindex is strongly recommended against.
 
...
        ifvarg WEAPON_COUNT 25
        {
            '''getplayer'''[THISACTOR].weapon_pos TEMP2
            ifvarl TEMP2 10
            addvar TEMP2 2
            ifvarg TEMP2 9 setvar TEMP2 9
            setplayer[THISACTOR].weapon_pos TEMP2
        }
...


[[Category:EDuke commands]]
[[Category:EDuke commands]]
[[Category:Gamevar manipulation]]
[[Category:Gamevar manipulation]]
[[Category:Player manipulation]]
[[Category:Player manipulation]]

Latest revision as of 14:29, 31 May 2020