Make Nightvision light rooms - EDukeWiki

# Make Nightvision light rooms

From EDukeWiki
Revision as of 22:38, 15 April 2007 by DeeperThought (talk | contribs)

This simple example illustrates how to check and alter members of the player structure. This code will cause low visibility areas to become fully visible when the nightvision goggles are used (the normal goggle effects are unchanged).

    gamevar TEMP 0 1

    actor APLAYER MAXPLAYERHEALTH PSTAND 0 0 // this line is unchanged from the standard cons

    getplayer[THISACTOR].heat_on TEMP // this reads the heat_on member of the player structure into TEMP

    // heat_on is 0 if the goggles are off, 1 if they are on

    ifvare TEMP 1 setplayer[THISACTOR].visibility 0 // if the goggles are on, visibility is set to 0 (full)

    // the normal APLAYER code resumes below...

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

- Tutorials