Setplayer: Difference between revisions
. |
Hunter byte (talk | contribs) mNo edit summary |
||
| Line 18: | Line 18: | ||
[[Category:EDuke commands]] | [[Category:EDuke commands]] | ||
[[Category:Player manipulation]] | [[Category:Player manipulation]] | ||
[[Category:Gamevar manipulation]] | |||
Revision as of 12:56, 21 April 2008
This allows you to set one of the members of the player structure to the value of a gamevar.
setplayer[<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
}
...