Talk:Player
Jump to navigation
Jump to search
Player vs. PlayerRef[edit source]
My problem: In some scripts the word "player" compiles as the player reference (FormID: 0x00000014), while in other scripts, it compiles as the player Base object (FormID: 0x00000007).
Explanation from scruggsy:
- This has to do with the way Oblivion compiles script references to objects and particularly to the player character.
- Use "player" to refer to the base player object (formID 00000007) and "playerRef" for the player reference (formID 00000014).
- The compiler (and OBSE) give you some leeway with "player", treating it as a reference when necessary (e.g. before a dot in a function call) but both can get confused when the usage is ambiguous (e.g. as a function argument). Admittedly the vanilla parse routines are more forgiving here.
- QQuix 12:02, 20 January 2010 (EST)