Difference between revisions of "Player"
Jump to navigation
Jump to search
imported>Exemptnormal85 (→Notes) |
imported>QQuix (Claarifying Player vs. PlayerRef) |
||
Line 7: | Line 7: | ||
* The player reference is also hardwired into the engine with formid 0x00000014. | * The player reference is also hardwired into the engine with formid 0x00000014. | ||
** The player reference does not actually appear in Oblivion.esm. The game engine automatically adds it at runtime. | ** The player reference does not actually appear in Oblivion.esm. The game engine automatically adds it at runtime. | ||
* When the string "player" is used in a script, it | * In scripts, use "playerRef" to refer to the player reference (formID 0x00000014). | ||
** If you need to refer to the player | * When the string "player" is used in a script, the compiler (and OBSE) give you some leeway, treating it as a reference when necessary (e.g. before a dot) but both can get confused when the usage is ambiguous (e.g. as a function argument). | ||
** If you need to refer to the player base object in a script, then you'll need to use its formid. (Or if using OBSE, use a call like "playerRef.getBaseObject".) |
Latest revision as of 11:47, 20 January 2010
- Player
- The character controlled by the user.
- A reference variable that always references the player.
Notes[edit | edit source]
- The player base object is hardwired into the engine with formid 0x00000007.
- The player reference is also hardwired into the engine with formid 0x00000014.
- The player reference does not actually appear in Oblivion.esm. The game engine automatically adds it at runtime.
- In scripts, use "playerRef" to refer to the player reference (formID 0x00000014).
- When the string "player" is used in a script, the compiler (and OBSE) give you some leeway, treating it as a reference when necessary (e.g. before a dot) but both can get confused when the usage is ambiguous (e.g. as a function argument).
- If you need to refer to the player base object in a script, then you'll need to use its formid. (Or if using OBSE, use a call like "playerRef.getBaseObject".)