Ocarina of Time

Player States

State flags

⁠Data primarily compiled by Exodus

Link's actor code keeps track of 72 flags which are referred to as "state flags"; for the most part, these flags represent various states in which Link can be (such as climbing a ledge or being underwater). These flags are, by convention, divided into three sets (stateFlags1 and stateFlags2, which are both 4 bytes / 32 bits, and stateFlags3 which only has 8 bits), although there is no apparent order or logic to the flags. There is a spreadsheet by Exodus documenting the state flags ⁠here. The table shows the addresses for the original NTSC versions, but on any version they are located at Link + 0x66C, Link + 0x670, and Link + 0x682 respectively.

AddressesNTSC 1.0NTSC 1.1NTSC 1.2
stateFlags1801DB09C801DB25C801DB95C
stateFlags2801DB0A0801DB260801DB960
stateFlags3801DB0B2801DB272801DB972

Several glitches in Ocarina of Time work by preserving a state flag after it is supposed to be unset or by unsetting a state flag when it is supposed to be set. These are called here Player State Glitches, specific articles on which can be found on this site. The remainder of this page will document the player state flags.

stateFlags1

index
decomp name
description
0PLAYER_STATE1_00x1 = Loading a new area
1PLAYER_STATE1_SWINGING_BOTTLE0x2 = Swinging Bottle
2PLAYER_STATE1_20x4 = Reached Hookshot target
3PLAYER_STATE1_30x8 = First Person Item in Hand
4PLAYER_STATE1_HOSTILE_LOCK_ON0x10 = Z-Targeting an Enemy
5PLAYER_STATE1_50x20 = Disable inputs player actor is seeing, can still pause (only used during Bongo Bongo intro cutscene)
6PLAYER_STATE1_TALKING0x40 = Talking/ checking/ showing item with text box
7PLAYER_STATE1_DEAD0x80 = Death (Zombie Walking, ignore loading zone in MM)
8PLAYER_STATE1_START_CHANGING_HELD_ITEM0x100 = Putting Away Item
9PLAYER_STATE1_90x200 = First Person Item Loaded
10PLAYER_STATE1_100x400 = Receiving Item / Get Item Manipulation
11PLAYER_STATE1_CARRYING_ACTOR0x800 = Holding something over your head / Ground Jump
12PLAYER_STATE1_CHARGING_SPIN_ATTACK0x1000 = Charging Sword
13PLAYER_STATE1_130x2000 = Hanging from a ledge / Ledge Cancel (with Down on A)
14PLAYER_STATE1_140x4000 = Climbing to higher ground (or out of water) / Ledge Cancel
15PLAYER_STATE1_Z_TARGETING0x8000 = Z-Targeting
16PLAYER_STATE1_FRIENDLY_ACTOR_FOCUS0x10000 = Z-Targeting something (or checking/ speaking to it)
17PLAYER_STATE1_PARALLEL0x20000 = Z-Targeting
18PLAYER_STATE1_180x40000 = Jumping/Hopping
19PLAYER_STATE1_190x80000 = Fell off a ledge without jumping?
20PLAYER_STATE1_200x100000 = First person view (C-up) / Return A
21PLAYER_STATE1_210x200000 = Climbing a ladder or vines / Down A
22PLAYER_STATE1_SHIELDING0x400000 = Shielding
23PLAYER_STATE1_230x800000 = Riding Epona
24PLAYER_STATE1_USING_BOOMERANG0x1000000 = Boomerang in hand
25PLAYER_STATE1_BOOMERANG_THROWN0x2000000 = Threw Boomerang (Fixed Camera)
26PLAYER_STATE1_260x4000000 = Blinking Red (took damage)
27PLAYER_STATE1_270x8000000 = Swimming
28PLAYER_STATE1_280x10000000 = Using Cutscene Item (beans, trade item, ocarina, bottle, etc.)
29PLAYER_STATE1_290x20000000 = Freeze all Actors (including Link) / (Unset this when a text box is on screen to cause "Walking While Talking" or crawlspace GID or fairy revival GID)
30PLAYER_STATE1_LOCK_ON_FORCED_TO_RELEASE0x40000000 = unknown (messes up z-targeting when locked)
31PLAYER_STATE1_310x80000000 = Entering grotto (disable ground collision)

stateFlags2

index
decomp name
description
0PLAYER_STATE2_00x1 = Grab on A (for grabbing a pushable object)
1PLAYER_STATE2_CAN_ACCEPT_TALK_OFFER0x2 = Speak/Check on A
2PLAYER_STATE2_20x4 = Climb on A (for climbing a block that you can also grab)
3PLAYER_STATE2_30x8 = Set on various actions (running around, pulling items/masks, pulling/slashing sword) to decrement Link's burning timers
4PLAYER_STATE2_40x10 = Pushing/pulling a block
5PLAYER_STATE2_50x20 = Almost everything that moves you
6PLAYER_STATE2_60x40 = Hanging from Ledge / Climbing from hanging from ledge / Crawling in crawlspace / Leaving Crawlspace / Climbing Ladder / Climbing off ladder / Riding Epona / Dismounting Epona / grabbing something, etc
7PLAYER_STATE2_70x80 = Grabbed by Enemy (Like Like, Redead, Gibdo, Moblin, etc.)
8PLAYER_STATE2_80x100 = Holding a pushable block
9PLAYER_STATE2_FORCE_SAND_FLOOR_SOUND0x200 = force sand floor sound
10PLAYER_STATE2_100x400 = Underwater / Get Item Delay
11PLAYER_STATE2_110x800 = Dive Meter on A
12PLAYER_STATE2_120x1000 = Grabbing ladder/vines but not moving
13PLAYER_STATE2_LOCK_ON_WITH_SWITCH0x2000 = Switch Targeting something
14PLAYER_STATE2_140x4000 = Frozen in Ice
15PLAYER_STATE2_150x8000 = Completely freezes Link
16PLAYER_STATE2_DO_ACTION_ENTER0x10000 = Enter on A (for crawlspaces)
17PLAYER_STATE2_170x20000 = Spin Attacking
18PLAYER_STATE2_CRAWLING0x40000 = In crawlspace / Blank A
19PLAYER_STATE2_190x80000 = Sidehopping / Backflipping
20PLAYER_STATE2_NAVI_ACTIVE0x100000 = Navi is flying around
21PLAYER_STATE2_210x200000 = Navi is flashing on c-up
22PLAYER_STATE2_220x400000 = Down on A (while on Epona)
23PLAYER_STATE2_230x800000 = Green Navi
24PLAYER_STATE2_240x1000000 = Set when you pull ocarina in special places (lullaby spots, gossip stone, river frogs, etc.)
25PLAYER_STATE2_250x2000000 = Ocarina play spot music staff activated / Walking around with music staff (from timestop)
26PLAYER_STATE2_260x4000000 = Draw Link's reflection (used in Dark Link's room)
27PLAYER_STATE2_USING_OCARINA0x8000000 = Playing Ocarina (Freezes all actors except Link)
28PLAYER_STATE2_IDLE_FIDGET0x10000000 = Idle Animation
29PLAYER_STATE2_290x20000000 = Invisible (might be related to the invisibility glitches)
30PLAYER_STATE2_300x40000000 = Lunge (storage)
31PLAYER_STATE2_310x80000000 = Voiding out / Crushed

stateFlags3

index
decomp name
description
0PLAYER_STATE3_00x1 = Link ignores floor, water, and ceiling collision (used for dark link falling through the floor when damage is dealt)
1PLAYER_STATE3_10x2 = used for collision detection and correction. set by start of jumpslash, aerial damage, and some cutscene command
2PLAYER_STATE3_20x4 = Dark Link jumping on Link's sword? (UNSET BY PLAYER, used for dark link?)
3PLAYER_STATE3_30x8 = Set when you slash sword, but have not moved since
4PLAYER_STATE3_40x10 = some collision flag thing (UNUSED???)
5PLAYER_STATE3_50x20 = will pull ocarina for memory game
6PLAYER_STATE3_RESTORE_NAYRUS_LOVE0x40 = Set by ocarina effects actors when destroyed to signal Nayru's Love may be restored
7PLAYER_STATE3_FLYING_WITH_HOOKSHOT0x80 = Flying in the air with the hookshot as it pulls Player toward its destination

Last updated October 10, 2026 by Blue