Path: blob/master/Sonic 2/Scripts/OOZ/BallCannon.txt
1482 views
// ----------------------------------1// RSDK Project: Sonic 22// Script Description: Ball Cannon Object3// Script Author: Christian Whitehead/Simon Thomley4// Unpacked by Rubberduckycooly's script unpacker5// ----------------------------------67// ========================8// Aliases9// ========================1011private alias object.value0 : object.timer12private alias object.value1 : object.tablePos13private alias object.value2 : object.enterFrameTable14private alias object.value3 : object.fireFrameTable15private alias object.value4 : object.rotateFrameTable16private alias object.value5 : object.activePlayers17private alias object.value6 : object.lastCannon18private alias object.value7 : object.active1920// States21private alias 0 : BALLCANNON_IDLE22private alias 1 : BALLCANNON_ENTERED23private alias 2 : BALLCANNON_ROTATE24private alias 3 : BALLCANNON_FIREPLAYER25private alias 4 : BALLCANNON_EXITED2627// Player Aliases28private alias object.state : player.state29private alias object.visible : player.visible30private alias object.xpos : player.xpos31private alias object.ypos : player.ypos32private alias object.xvel : player.xvel33private alias object.yvel : player.yvel34private alias object.speed : player.speed35private alias object.gravity : player.gravity36private alias object.animationSpeed : player.animationSpeed37private alias object.animation : player.animation38private alias object.tileCollisions : player.tileCollisions3940private alias object.value1 : player.timer41private alias object.value5 : player.rollAnimationSpeed42private alias object.value17 : debugMode.currentSelection43private alias object.value35 : player.jumpAbilityState444546// ========================47// Function Declarations48// ========================4950reserve function BallCannon_DebugDraw51reserve function BallCannon_DebugSpawn525354// ========================55// Static Values56// ========================5758private value BallCannon_startDebugID = 0596061// ========================62// Tables63// ========================6465// Format for FrameTable entries:66// [object.frame], [object.direction]6768private table BallCannon_enterFrameTableU690, 0701, 0712, 072end table7374private table BallCannon_enterFrameTableD750, 2761, 2772, 278end table7980private table BallCannon_enterFrameTableL813, 1824, 1835, 184end table8586private table BallCannon_enterFrameTableR873, 0884, 0895, 090end table9192private table BallCannon_rotateFrameTableL936, 7, 8, 9, 10, 11, 12, 1394end table9596private table BallCannon_rotateFrameTableR9713, 12, 11, 10, 9, 8, 7, 698end table99100101// ========================102// Function Definitions103// ========================104105private function BallCannon_DebugDraw106temp0 = debugMode[0].currentSelection107temp0 -= BallCannon_startDebugID108DrawSprite(temp0)109end function110111112private function BallCannon_DebugSpawn113temp0 = debugMode[0].currentSelection114temp0 -= BallCannon_startDebugID115CreateTempObject(TypeName[Ball Cannon], temp0, object.xpos, object.ypos)116object[tempObjectPos].drawOrder = 4117object[tempObjectPos].enterFrameTable = BallCannon_enterFrameTableU118object[tempObjectPos].fireFrameTable = BallCannon_enterFrameTableR119object[tempObjectPos].rotateFrameTable = BallCannon_rotateFrameTableR120object[tempObjectPos].xvel = 0x100000121object[tempObjectPos].yvel = 0122object[tempObjectPos].lastCannon = true123124switch object[tempObjectPos].propertyValue125case 0126object[tempObjectPos].enterFrameTable = BallCannon_enterFrameTableU127object[tempObjectPos].fireFrameTable = BallCannon_enterFrameTableR128object[tempObjectPos].rotateFrameTable = BallCannon_rotateFrameTableR129object[tempObjectPos].xvel = 0x100000130object[tempObjectPos].yvel = 0131break132133case 1134object[tempObjectPos].enterFrameTable = BallCannon_enterFrameTableR135object[tempObjectPos].fireFrameTable = BallCannon_enterFrameTableD136object[tempObjectPos].rotateFrameTable = BallCannon_rotateFrameTableR137object[tempObjectPos].xvel = 0138object[tempObjectPos].yvel = 0x100000139break140141case 2142object[tempObjectPos].enterFrameTable = BallCannon_enterFrameTableD143object[tempObjectPos].fireFrameTable = BallCannon_enterFrameTableL144object[tempObjectPos].rotateFrameTable = BallCannon_rotateFrameTableR145object[tempObjectPos].xvel = -0x100000146object[tempObjectPos].yvel = 0147break148149case 3150object[tempObjectPos].enterFrameTable = BallCannon_enterFrameTableL151object[tempObjectPos].fireFrameTable = BallCannon_enterFrameTableU152object[tempObjectPos].rotateFrameTable = BallCannon_rotateFrameTableR153object[tempObjectPos].xvel = 0154object[tempObjectPos].yvel = -0x100000155break156157case 4158object[tempObjectPos].enterFrameTable = BallCannon_enterFrameTableR159object[tempObjectPos].fireFrameTable = BallCannon_enterFrameTableU160object[tempObjectPos].rotateFrameTable = BallCannon_rotateFrameTableL161object[tempObjectPos].xvel = 0162object[tempObjectPos].yvel = -0x100000163break164165case 5166object[tempObjectPos].enterFrameTable = BallCannon_enterFrameTableD167object[tempObjectPos].fireFrameTable = BallCannon_enterFrameTableR168object[tempObjectPos].rotateFrameTable = BallCannon_rotateFrameTableL169object[tempObjectPos].xvel = 0x100000170object[tempObjectPos].yvel = 0171break172173case 6174object[tempObjectPos].enterFrameTable = BallCannon_enterFrameTableL175object[tempObjectPos].fireFrameTable = BallCannon_enterFrameTableD176object[tempObjectPos].rotateFrameTable = BallCannon_rotateFrameTableL177object[tempObjectPos].xvel = 0178object[tempObjectPos].yvel = 0x100000179break180181case 7182object[tempObjectPos].enterFrameTable = BallCannon_enterFrameTableU183object[tempObjectPos].fireFrameTable = BallCannon_enterFrameTableL184object[tempObjectPos].rotateFrameTable = BallCannon_rotateFrameTableL185object[tempObjectPos].xvel = -0x100000186object[tempObjectPos].yvel = 0187break188end switch189end function190191192// ========================193// Events194// ========================195196event ObjectUpdate197switch object.state198case BALLCANNON_ENTERED199if object.timer == 0200if object.tablePos == 6201object.tablePos = 0202object.timer = 3203object.state++204else205GetTableValue(object.frame, object.tablePos, object.enterFrameTable)206object.tablePos++207GetTableValue(object.direction, object.tablePos, object.enterFrameTable)208object.tablePos++209end if210end if211object.timer++212object.timer &= 3213break214215case BALLCANNON_ROTATE216if object.timer == 0217if object.tablePos == 8218object.tablePos = 5219object.timer = 1220object.state++221else222GetTableValue(object.frame, object.tablePos, object.rotateFrameTable)223object.direction = FLIP_NONE224object.tablePos++225end if226end if227object.timer++228object.timer &= 1229break230231case BALLCANNON_FIREPLAYER232if object.timer == 0233if object.tablePos < 0234object.tablePos = 0235object.state++236foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)237temp0 = 1238temp0 <<= currentPlayer239temp0 &= object.activePlayers240if temp0 != false241#platform: USE_ORIGINS242temp0 = 1243temp0 <<= currentPlayer244temp0 &= object.active245if temp0 == false246temp0 = 1247temp0 <<= currentPlayer248object.active |= temp0249#endplatform250if object.lastCannon == true251#platform: USE_STANDALONE252player[currentPlayer].state = Player_State_Air253#endplatform254#platform: USE_ORIGINS255player[currentPlayer].state = Player_State_Air_NoDropDash256#endplatform257player[currentPlayer].gravity = 1258player[currentPlayer].jumpAbilityState = 0259player[currentPlayer].tileCollisions = true260end if261player[currentPlayer].visible = true262player[currentPlayer].timer = 0263player[currentPlayer].speed = object.xvel264player[currentPlayer].xvel = object.xvel265player[currentPlayer].yvel = object.yvel266#platform: USE_ORIGINS267end if268#endplatform269end if270next271else272GetTableValue(object.direction, object.tablePos, object.fireFrameTable)273object.tablePos--274GetTableValue(object.frame, object.tablePos, object.fireFrameTable)275object.tablePos--276end if277end if278object.timer++279object.timer &= 3280break281282case BALLCANNON_EXITED283object.timer++284if object.timer == 16285object.timer = 0286object.activePlayers = 0287#platform: USE_ORIGINS288object.active = false289#endplatform290object.state = BALLCANNON_IDLE291end if292break293294end switch295296foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)297BoxCollisionTest(C_TOUCH, object.entityPos, -4, -4, 4, 4, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)298if checkResult == true299temp0 = true300temp0 <<= currentPlayer301temp0 &= object.activePlayers302if temp0 == 0303player[currentPlayer].state = Player_State_Static304player[currentPlayer].animation = ANI_JUMPING305player[currentPlayer].animationSpeed = 0xF0306player[currentPlayer].rollAnimationSpeed = 0xF0307player[currentPlayer].xpos = object.xpos308player[currentPlayer].ypos = object.ypos309player[currentPlayer].speed = 0310player[currentPlayer].xvel = 0311player[currentPlayer].yvel = 0312player[currentPlayer].visible = false313player[currentPlayer].tileCollisions = false314temp0 = true315temp0 <<= currentPlayer316object.activePlayers |= temp0317#platform: USE_ORIGINS318CheckGreater(object.state, BALLCANNON_IDLE)319temp0 = checkResult320CheckLower(object.state, BALLCANNON_EXITED)321temp0 &= checkResult322if temp0 == false323#endplatform324object.timer = 0325object.tablePos = 0326object.state = BALLCANNON_ENTERED327#platform: USE_ORIGINS328end if329#endplatform330if object.priority != PRIORITY_XBOUNDS_DESTROY331object.priority = PRIORITY_ACTIVE332end if333PlaySfx(SfxName[Rolling], false)334end if335end if336next337338if object.outOfBounds == true339if object.priority != PRIORITY_XBOUNDS_DESTROY340object.priority = PRIORITY_BOUNDS341object.tablePos = 0342object.activePlayers = 0343object.active = false344object.timer = 0345GetTableValue(object.frame, 0, object.enterFrameTable)346GetTableValue(object.direction, 1, object.enterFrameTable)347object.state = BALLCANNON_IDLE348end if349end if350end event351352353event ObjectDraw354DrawSpriteFX(object.frame, FX_FLIP, object.xpos, object.ypos)355end event356357358event ObjectStartup359CheckCurrentStageFolder("Zone07")360if checkResult == true361LoadSpriteSheet("OOZ/Objects.gif")362SpriteFrame(-24, -40, 48, 64, 133, 142) // Enter Frame 1 (V) - #0363SpriteFrame(-24, -32, 48, 56, 133, 85) // Enter Frame 2 (V) - #1364SpriteFrame(-24, -24, 48, 48, 133, 93) // Enter Frame 3 (V) - #2365SpriteFrame(-24, -24, 64, 48, 1, 101) // Enter Frame 1 (H) - #3366SpriteFrame(-24, -24, 56, 48, 1, 150) // Enter Frame 2 (H) - #4367SpriteFrame(-24, -24, 48, 48, 1, 150) // Enter Frame 3 (H) - #5368SpriteFrame(-24, -24, 48, 48, 316, 1) // Rotate Frame 1 - #6369SpriteFrame(-24, -24, 48, 48, 365, 1) // Rotate Frame 2 - #7370SpriteFrame(-24, -24, 48, 48, 414, 1) // Rotate Frame 3 - #8371SpriteFrame(-24, -24, 48, 48, 463, 1) // Rotate Frame 4 - #9372SpriteFrame(-24, -24, 48, 48, 316, 50) // Rotate Frame 5 - #10373SpriteFrame(-24, -24, 48, 48, 365, 50) // Rotate Frame 6 - #11374SpriteFrame(-24, -24, 48, 48, 414, 50) // Rotate Frame 7 - #12375SpriteFrame(-24, -24, 48, 48, 463, 50) // Rotate Frame 8 - #13376else377LoadSpriteSheet("MBZ/Objects.gif")378SpriteFrame(-24, -40, 48, 64, 813, 861) // Enter Frame 1 (V) - #0379SpriteFrame(-24, -32, 48, 56, 764, 869) // Enter Frame 2 (V) - #1380SpriteFrame(-24, -24, 48, 48, 764, 877) // Enter Frame 3 (V) - #2381SpriteFrame(-24, -24, 64, 48, 763, 926) // Enter Frame 1 (H) - #3382SpriteFrame(-24, -24, 56, 48, 771, 975) // Enter Frame 2 (H) - #4383SpriteFrame(-24, -24, 48, 48, 771, 975) // Enter Frame 3 (H) - #5384SpriteFrame(-24, -24, 48, 48, 828, 926) // Rotate Frame 1 - #6385SpriteFrame(-24, -24, 48, 48, 877, 926) // Rotate Frame 2 - #7386SpriteFrame(-24, -24, 48, 48, 926, 926) // Rotate Frame 3 - #8387SpriteFrame(-24, -24, 48, 48, 975, 926) // Rotate Frame 4 - #9388SpriteFrame(-24, -24, 48, 48, 828, 975) // Rotate Frame 5 - #10389SpriteFrame(-24, -24, 48, 48, 877, 975) // Rotate Frame 6 - #11390SpriteFrame(-24, -24, 48, 48, 926, 975) // Rotate Frame 7 - #12391SpriteFrame(-24, -24, 48, 48, 975, 975) // Rotate Frame 8 - #13392end if393394foreach (TypeName[Ball Cannon], arrayPos0, ALL_ENTITIES)395if object[arrayPos0].propertyValue > 7396object[arrayPos0].lastCannon = true397object[arrayPos0].propertyValue &= 7398end if399400switch object[arrayPos0].propertyValue401case 0402object[arrayPos0].enterFrameTable = BallCannon_enterFrameTableU403object[arrayPos0].fireFrameTable = BallCannon_enterFrameTableR404object[arrayPos0].rotateFrameTable = BallCannon_rotateFrameTableR405object[arrayPos0].xvel = 0x100000406object[arrayPos0].yvel = 0407break408409case 1410object[arrayPos0].enterFrameTable = BallCannon_enterFrameTableR411object[arrayPos0].fireFrameTable = BallCannon_enterFrameTableD412object[arrayPos0].rotateFrameTable = BallCannon_rotateFrameTableR413object[arrayPos0].xvel = 0414object[arrayPos0].yvel = 0x100000415break416417case 2418object[arrayPos0].enterFrameTable = BallCannon_enterFrameTableD419object[arrayPos0].fireFrameTable = BallCannon_enterFrameTableL420object[arrayPos0].rotateFrameTable = BallCannon_rotateFrameTableR421object[arrayPos0].xvel = -0x100000422object[arrayPos0].yvel = 0423break424425case 3426object[arrayPos0].enterFrameTable = BallCannon_enterFrameTableL427object[arrayPos0].fireFrameTable = BallCannon_enterFrameTableU428object[arrayPos0].rotateFrameTable = BallCannon_rotateFrameTableR429object[arrayPos0].xvel = 0430object[arrayPos0].yvel = -0x100000431break432433case 4434object[arrayPos0].enterFrameTable = BallCannon_enterFrameTableR435object[arrayPos0].fireFrameTable = BallCannon_enterFrameTableU436object[arrayPos0].rotateFrameTable = BallCannon_rotateFrameTableL437object[arrayPos0].xvel = 0438object[arrayPos0].yvel = -0x100000439break440441case 5442object[arrayPos0].enterFrameTable = BallCannon_enterFrameTableD443object[arrayPos0].fireFrameTable = BallCannon_enterFrameTableR444object[arrayPos0].rotateFrameTable = BallCannon_rotateFrameTableL445object[arrayPos0].xvel = 0x100000446object[arrayPos0].yvel = 0447break448449case 6450object[arrayPos0].enterFrameTable = BallCannon_enterFrameTableL451object[arrayPos0].fireFrameTable = BallCannon_enterFrameTableD452object[arrayPos0].rotateFrameTable = BallCannon_rotateFrameTableL453object[arrayPos0].xvel = 0454object[arrayPos0].yvel = 0x100000455break456457case 7458object[arrayPos0].enterFrameTable = BallCannon_enterFrameTableU459object[arrayPos0].fireFrameTable = BallCannon_enterFrameTableL460object[arrayPos0].rotateFrameTable = BallCannon_rotateFrameTableL461object[arrayPos0].xvel = -0x100000462object[arrayPos0].yvel = 0463break464465end switch466467object[arrayPos0].drawOrder = 4468object[arrayPos0].propertyValue = 0469GetTableValue(object[arrayPos0].frame, 0, object[arrayPos0].enterFrameTable)470GetTableValue(object[arrayPos0].direction, 1, object[arrayPos0].enterFrameTable)471next472473temp0 = 0474BallCannon_startDebugID = DebugMode_ObjCount475while temp0 < 4476SetTableValue(TypeName[Ball Cannon], DebugMode_ObjCount, DebugMode_TypesTable)477SetTableValue(BallCannon_DebugDraw, DebugMode_ObjCount, DebugMode_DrawTable)478SetTableValue(BallCannon_DebugSpawn, DebugMode_ObjCount, DebugMode_SpawnTable)479DebugMode_ObjCount++480temp0++481loop482end event483484485// ========================486// Editor Events487// ========================488489event RSDKEdit490if editor.returnVariable == true491switch editor.variableID492case EDIT_VAR_PROPVAL // property value493checkResult = object.propertyValue494break495496case 0 // type497checkResult = object.propertyValue498checkResult &= 7499break500501case 1 // noControlLock502GetBit(checkResult, object.propertyValue, 3)503break504505end switch506else507switch editor.variableID508case EDIT_VAR_PROPVAL // property value509object.propertyValue = editor.variableValue510break511512case 0 // type513editor.variableValue &= 7514object.propertyValue &= 0xF8515516object.propertyValue |= editor.variableValue517break518519case 1 // noControlLock520CheckNotEqual(editor.variableValue, false)521SetBit(object.propertyValue, 3, checkResult)522break523524end switch525end if526end event527528529event RSDKDraw530temp0 = object.propertyValue531temp0 &= 7532533switch temp0534case 0535object.enterFrameTable = BallCannon_enterFrameTableU536object.fireFrameTable = BallCannon_enterFrameTableR537break538539case 1540object.enterFrameTable = BallCannon_enterFrameTableR541object.fireFrameTable = BallCannon_enterFrameTableD542break543544case 2545object.enterFrameTable = BallCannon_enterFrameTableD546object.fireFrameTable = BallCannon_enterFrameTableL547break548549case 3550object.enterFrameTable = BallCannon_enterFrameTableL551object.fireFrameTable = BallCannon_enterFrameTableU552break553554case 4555object.enterFrameTable = BallCannon_enterFrameTableR556object.fireFrameTable = BallCannon_enterFrameTableU557break558559case 5560object.enterFrameTable = BallCannon_enterFrameTableD561object.fireFrameTable = BallCannon_enterFrameTableR562break563564case 6565object.enterFrameTable = BallCannon_enterFrameTableL566object.fireFrameTable = BallCannon_enterFrameTableD567break568569case 7570object.enterFrameTable = BallCannon_enterFrameTableU571object.fireFrameTable = BallCannon_enterFrameTableL572break573574end switch575576// (drawing *behind* the main sprite)577if editor.showGizmos == true578editor.drawingOverlay = true579580GetTableValue(object.frame, 0, object.fireFrameTable)581GetTableValue(object.direction, 1, object.fireFrameTable)582583// Again, no combining FX_INK and FX_FLIP, so..584DrawSpriteFX(object.frame, FX_FLIP, object.xpos, object.ypos)585586editor.drawingOverlay = false587end if588589GetTableValue(object.frame, 0, object.enterFrameTable)590GetTableValue(object.direction, 1, object.enterFrameTable)591592DrawSpriteFX(object.frame, FX_FLIP, object.xpos, object.ypos)593594if editor.showGizmos == true595editor.drawingOverlay = true596597temp0 = object.xpos598temp1 = object.ypos599switch object.enterFrameTable600case BallCannon_enterFrameTableU601temp1 -= 0x480000602break603604case BallCannon_enterFrameTableD605temp1 += 0x480000606break607608case BallCannon_enterFrameTableL609temp0 -= 0x480000610break611612case BallCannon_enterFrameTableR613temp0 += 0x480000614break615616end switch617618DrawArrow(temp0, temp1, object.xpos, object.ypos, 0xFF, 0x00, 0x00)619620temp0 = object.xpos621temp1 = object.ypos622switch object.fireFrameTable623case BallCannon_enterFrameTableU624temp1 -= 0x480000625break626627case BallCannon_enterFrameTableD628temp1 += 0x480000629break630631case BallCannon_enterFrameTableL632temp0 -= 0x480000633break634635case BallCannon_enterFrameTableR636temp0 += 0x480000637break638639end switch640641DrawArrow(object.xpos, object.ypos, temp0, temp1, 0xFF, 0x00, 0x00)642643editor.drawingOverlay = false644end if645end event646647648event RSDKLoad649CheckCurrentStageFolder("Zone07")650if checkResult == true651LoadSpriteSheet("OOZ/Objects.gif")652SpriteFrame(-24, -40, 48, 64, 133, 142) // Enter Frame 1 (V) - #0653SpriteFrame(-24, -32, 48, 56, 133, 85) // Enter Frame 2 (V) - #1654SpriteFrame(-24, -24, 48, 48, 133, 93) // Enter Frame 3 (V) - #2655SpriteFrame(-24, -24, 64, 48, 1, 101) // Enter Frame 1 (H) - #3656SpriteFrame(-24, -24, 56, 48, 1, 150) // Enter Frame 2 (H) - #4657SpriteFrame(-24, -24, 48, 48, 1, 150) // Enter Frame 3 (H) - #5658SpriteFrame(-24, -24, 48, 48, 316, 1) // Rotate Frame 1 - #6659SpriteFrame(-24, -24, 48, 48, 365, 1) // Rotate Frame 2 - #7660SpriteFrame(-24, -24, 48, 48, 414, 1) // Rotate Frame 3 - #8661SpriteFrame(-24, -24, 48, 48, 463, 1) // Rotate Frame 4 - #9662SpriteFrame(-24, -24, 48, 48, 316, 50) // Rotate Frame 5 - #10663SpriteFrame(-24, -24, 48, 48, 365, 50) // Rotate Frame 6 - #11664SpriteFrame(-24, -24, 48, 48, 414, 50) // Rotate Frame 7 - #12665SpriteFrame(-24, -24, 48, 48, 463, 50) // Rotate Frame 8 - #13666else667LoadSpriteSheet("MBZ/Objects.gif")668SpriteFrame(-24, -40, 48, 64, 813, 861) // Enter Frame 1 (V) - #0669SpriteFrame(-24, -32, 48, 56, 764, 869) // Enter Frame 2 (V) - #1670SpriteFrame(-24, -24, 48, 48, 764, 877) // Enter Frame 3 (V) - #2671SpriteFrame(-24, -24, 64, 48, 763, 926) // Enter Frame 1 (H) - #3672SpriteFrame(-24, -24, 56, 48, 771, 975) // Enter Frame 2 (H) - #4673SpriteFrame(-24, -24, 48, 48, 771, 975) // Enter Frame 3 (H) - #5674SpriteFrame(-24, -24, 48, 48, 828, 926) // Rotate Frame 1 - #6675SpriteFrame(-24, -24, 48, 48, 877, 926) // Rotate Frame 2 - #7676SpriteFrame(-24, -24, 48, 48, 926, 926) // Rotate Frame 3 - #8677SpriteFrame(-24, -24, 48, 48, 975, 926) // Rotate Frame 4 - #9678SpriteFrame(-24, -24, 48, 48, 828, 975) // Rotate Frame 5 - #10679SpriteFrame(-24, -24, 48, 48, 877, 975) // Rotate Frame 6 - #11680SpriteFrame(-24, -24, 48, 48, 926, 975) // Rotate Frame 7 - #12681SpriteFrame(-24, -24, 48, 48, 975, 975) // Rotate Frame 8 - #13682end if683684AddEditorVariable("type")685SetActiveVariable("type")686AddEnumVariable("Up -> Right", 0)687AddEnumVariable("Right -> Down", 1)688AddEnumVariable("Down -> Left", 2)689AddEnumVariable("Left -> Up", 3)690AddEnumVariable("Right -> Up", 4)691AddEnumVariable("Down -> Right", 5)692AddEnumVariable("Left -> Down", 6)693AddEnumVariable("Up -> Left", 7)694695AddEditorVariable("noControlLock")696SetActiveVariable("noControlLock")697AddEnumVariable("false", false)698AddEnumVariable("true", true)699end event700701702