Reference Globals flags - saintfrater/LSL1FR GitHub Wiki

Flags

On the interpreter startup all flags are set to 0.
All flags and variables can be accessed by any script (0-255).
If you need to pass information between one script and another, you have to use variables and flags.

Flags are Boolean and store 0 or 1 (True or False).

When a flag is set to True, we say it is “set.”
When you set a flag to False, you can say you have “reset” it.

Flags are good for storing simple information in.
Instead of using a variable to just store a 0 or 1, you can use a flag.
But, like LOGIC files, some variables and some flags are used by the system.
Your best bet is not to use any flags or variables under 40 for yourself.

Common Flags

flag name flag ID Descr
Ego on Water f0 Ego base line is completely on pixels with priority = 3 (water surface).
Ego is Obscured f1 Ego is invisible of the screen (completely obscured by another object).
Input Received f2 the player has issued a command line.
Ego on Signal Line f3 Ego base line has touched a pixel with priority 2 (signal).
Said Found Match f4 said command has accepted the user input.
New Room f5 The new room is executed for the first time.
Game Restarted f6 restart_game command has been executed.
Script Disabled f7 if this flag is 1, writing to the script buffer is blocked.
Joystick Double-Click Enabled f8 if 1, Var(15) determines the joystick sensitivity.
Sound On f9 sound on/off.
Command Tracer Enabled f10 1 turns on the built-in debugger.
New Room0 f11 Logic 0 is executed for the first time.
Game Restored f12 restore_game command has been executed.
Inventory Selection Enabled f13 1 allows the status command to select items.
Menu Enabled f14 1 allows the menu to work.
Message Windows Don't Pause Game f15
Auto-restart f16
Forced Auto-Loop Selection f20

f2

This flag is set when the user has entered an input line.

f4

said command accepted the user input is set to 0.

f5

This flag is set to 1 when the interpreter run first cycle after the new_room command.
All initialization parts of all logics loaded and called from the initialization part of the new room's logic will be called.
In the subsequent cycle Flag(5) is reset to 0.

f13

set Flag(13) = 1 to allow item selection. A highlight appears which allows the player to select an item name in the inventory window.

f14

If Flag(14) = 1, a menu system is shown on the screen, allowing the user to choose an item.
Whether an item with the code c has been chosen, Logic can be tested using a command controller(c), where c is the code assigned to the menu item.

f15

Determines the output mode of print and print_at

1 - message window is left on the screen  
0 - message window is closed when ENTER or ESC key are pressed.  
      If Var(21) is not 0,  
         the window is closed automatically after 1/2 * Var(21) seconds  

Game specifics flags

flag name flagID descr
boolDebugInGame f30 Set to debug question / cheat in game
boolCallDebugger f32 Casino Games Table & InGame & Setup & Logic0
f33 Casino Games Slot & Table & Debug
f34
f35 Logic 0 & Penthouse (Bed, lift, Hottub
f36
f37
f38
f40
f41
boolShowClock f42 is Clock should be displayed
boolClockRedraw f43 Clock title must be re-printed
boolSecondHasChange f44 Second has changed ?
f45
f46
f47
f49
f50
boolMusicEnded f52
f53
f54
f55
f56
f57
f58
f59
boolHasLookedBoncer f60 Is Larry already looked at the bouncer once ?
f61
boolLarryWearCondom f62 Set when Larry has put (and wear) a Condom
boolSexWithHooker f63
f64
f65
boolHasFreshBreath f66 Is Larry has a fresh breath ?
f67
boolLarryDontHaveIt f68 Set when Larry is trying to use item he didn't have (yet ?)
f69
f70
f71
f72
f73
f74
boolTimingDelayOut f75
f76
f77
f78
f79
f80
f81
f82
f83
f84
boolDisablePlayer f85 when true, player cannot move Larry
f87
f88
f89
f90
f91
f92
f93
f94
f95
f96
f97
f98
f100
f101
f102
f103
f104
f105
f106
f107
f108 Cabaret & Leftys & Liquor Exterior & Liquor interior & Start
f110 Chapel Outside
f111 Casino Honeymoon & Lift
f112 Liquor Outside
f113 Liquor Outside
f114 Liquor Outside
f115 Liquor Outside
f116 Leftys bathroom
f117 Cabaret
f118 Casino & Disco outside, main game & Title Exit
f119 Disco Outside
f120 Logic0
f121 Liquor store
f122 Disco & Fawn
f124 Disco & Fawn
f125 Disco & Fawn
boolScoreInflatedDool f126 Penthouse Bedroom : score point add for inflating the doll