Path: blob/master/Sonic 1/Scripts/Global/Spikes.txt
1483 views
// ----------------------------------1// RSDK Project: Sonic 12// Script Description: Spikes 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.moveOffset1314private alias 0 : SPIKES_STATIC15private alias 1 : SPIKES_HIDDEN16private alias 2 : SPIKES_APPEAR17private alias 3 : SPIKES_SHOWN18private alias 4 : SPIKES_DISAPPEAR1920// Player Aliases21private alias object.gravity : player.gravity22private alias object.yvel : player.yvel23private alias object.xvel : player.xvel24private alias object.value7 : player.invincibleTimer25private alias object.value17 : debugMode.currentSelection2627// ========================28// Function Declarations29// ========================3031reserve function Spikes_DebugDraw32reserve function Spikes_DebugSpawn333435// ========================36// Static Values37// ========================3839private value Spikes_startDebugID = 0404142// ========================43// Function Definitions44// ========================4546private function Spikes_DebugDraw47temp2 = debugMode[0].currentSelection48temp2 -= Spikes_startDebugID49switch temp250case 0 // 3 Spikes (Up)51case 1 // 3 Spikes (Right)52case 2 // 3 Spikes (Left)53case 3 // 3 Spikes (Down)54case 4 // 1 Spike (Up)55case 5 // 1 Spike (Right)56case 6 // 1 Spike (Left)57case 7 // 1 Spike (Down)58DrawSprite(temp2)59break6061case 8 // 3 Spikes (Spaced Out) (Up)62case 11 // 3 Spikes (Spaced Out) (Down)63temp1 = temp264temp1 -= 465DrawSprite(temp1)66temp0 = object.xpos67temp0 -= 0x18000068DrawSpriteXY(temp1, temp0, object.ypos)69temp0 += 0x30000070DrawSpriteXY(temp1, temp0, object.ypos)71break7273case 9 // 3 Spikes (Spaced Out) (Right)74case 10 // 3 Spikes (Spaced Out) (Left)75temp1 = temp276temp1 -= 477DrawSprite(temp1)78temp0 = object.ypos79temp0 -= 0x18000080DrawSpriteXY(temp1, object.xpos, temp0)81temp0 += 0x30000082DrawSpriteXY(temp1, object.xpos, temp0)83break8485case 12 // 6 Spikes (Spaced Out) (Up)86case 15 // 6 Spikes (Spaced Out) (Down)87temp1 = temp288temp1 -= 889temp0 = object.xpos90temp0 -= 0x3C000091temp2 = 092while temp2 < 693DrawSpriteXY(temp1, temp0, object.ypos)94temp0 += 0x18000095temp2++96loop97break9899case 13 // 6 Spikes (Spaced Out) (Right)100case 14 // 6 Spikes (Spaced Out) (Left)101temp1 = temp2102temp1 -= 8103temp0 = object.ypos104temp0 -= 0x3C0000105temp2 = 0106while temp2 < 6107DrawSpriteXY(temp1, object.xpos, temp0)108temp0 += 0x180000109temp2++110loop111break112113end switch114end function115116117private function Spikes_DebugSpawn118temp0 = debugMode[0].currentSelection119temp0 -= Spikes_startDebugID120CreateTempObject(TypeName[Spikes], temp0, object.xpos, object.ypos)121end function122123124// ========================125// Events126// ========================127128event ObjectUpdate129switch object.state130default131case SPIKES_STATIC132break133134case SPIKES_HIDDEN135if object.timer < 60136object.timer++137else138object.state++139object.timer = 0140141temp0 = screen.xcenter142FlipSign(temp0)143BoxCollisionTest(C_TOUCH, object.entityPos, temp0, -100, screen.xcenter, 100, 0, C_BOX, C_BOX, C_BOX, C_BOX)144if checkResult == true145PlaySfx(SfxName[Spikes Move], false)146end if147end if148break149150case SPIKES_APPEAR151if object.moveOffset < 0x200000152object.moveOffset += 0x80000153object.xpos += object.xvel154object.ypos += object.yvel155else156object.state++157end if158break159160case SPIKES_SHOWN161if object.timer < 60162object.timer++163else164object.state++165object.timer = 0166temp0 = screen.xcenter167FlipSign(temp0)168BoxCollisionTest(C_TOUCH, object.entityPos, temp0, -100, screen.xcenter, 100, 0, C_BOX, C_BOX, C_BOX, C_BOX)169if checkResult == true170PlaySfx(SfxName[Spikes Move], false)171end if172end if173break174175case SPIKES_DISAPPEAR176if object.moveOffset > 0177object.moveOffset -= 0x80000178object.xpos -= object.xvel179object.ypos -= object.yvel180else181object.state = SPIKES_HIDDEN182end if183break184185end switch186187switch object.propertyValue188case 0189foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)190BoxCollisionTest(C_SOLID, object.entityPos, -20, -16, 20, 16, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)191if checkResult == COL_BOTTOM192if player[currentPlayer].gravity == GRAVITY_GROUND193CallFunction(Player_Kill)194end if195end if196197if player[currentPlayer].yvel > -1198BoxCollisionTest(C_TOUCH, object.entityPos, -19, -17, 19, -12, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)199if checkResult == true200CallFunction(Player_SpikeHit)201end if202end if203next204break205206case 1207foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)208BoxCollisionTest(C_SOLID, object.entityPos, -16, -20, 15, 20, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)209if checkResult == COL_BOTTOM210if player[currentPlayer].gravity == GRAVITY_GROUND211CallFunction(Player_Kill)212end if213end if214215if player[currentPlayer].xvel <= 0216BoxCollisionTest(C_TOUCH, object.entityPos, 12, -19, 16, 19, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)217if checkResult == true218CallFunction(Player_SpikeHit)219end if220end if221next222break223224case 2225foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)226BoxCollisionTest(C_SOLID, object.entityPos, -15, -20, 16, 20, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)227if checkResult == COL_BOTTOM228if player[currentPlayer].gravity == GRAVITY_GROUND229CallFunction(Player_Kill)230end if231end if232233BoxCollisionTest(C_TOUCH, object.entityPos, -16, -19, -12, 19, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)234if checkResult == true235CallFunction(Player_SpikeHit)236end if237next238break239240case 3241foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)242temp0 = player[currentPlayer].yvel243BoxCollisionTest(C_SOLID, object.entityPos, -20, -16, 20, 15, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)244if checkResult == COL_BOTTOM245if player[currentPlayer].gravity == GRAVITY_GROUND246CallFunction(Player_Kill)247player[currentPlayer].invincibleTimer = 0248else249CallFunction(Player_SpikeHit)250end if251temp0 = 1252end if253254if temp0 < 1255BoxCollisionTest(C_TOUCH, object.entityPos, -19, 12, 19, 14, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)256if checkResult == true257CallFunction(Player_SpikeHit)258end if259end if260next261break262263case 4264foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)265BoxCollisionTest(C_SOLID, object.entityPos, -4, -16, 4, 16, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)266if checkResult == COL_BOTTOM267if player[currentPlayer].gravity == GRAVITY_GROUND268CallFunction(Player_Kill)269end if270end if271272if player[currentPlayer].yvel > -1273BoxCollisionTest(C_TOUCH, object.entityPos, -3, -17, 3, -12, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)274if checkResult == true275CallFunction(Player_SpikeHit)276end if277end if278next279break280281case 5282foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)283BoxCollisionTest(C_SOLID, object.entityPos, -16, -4, 15, 4, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)284if checkResult == COL_BOTTOM285if player[currentPlayer].gravity == GRAVITY_GROUND286CallFunction(Player_Kill)287end if288end if289290if player[currentPlayer].xvel <= 0291BoxCollisionTest(C_TOUCH, object.entityPos, 12, -3, 16, 3, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)292if checkResult == true293CallFunction(Player_SpikeHit)294end if295end if296next297break298299case 6300foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)301BoxCollisionTest(C_SOLID, object.entityPos, -15, -4, 16, 4, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)302if checkResult == COL_BOTTOM303if player[currentPlayer].gravity == GRAVITY_GROUND304CallFunction(Player_Kill)305end if306end if307308BoxCollisionTest(C_TOUCH, object.entityPos, -16, -3, -12, 3, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)309if checkResult == true310CallFunction(Player_SpikeHit)311end if312next313break314315case 7316foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)317temp0 = player[currentPlayer].yvel318BoxCollisionTest(C_SOLID, object.entityPos, -4, -16, 4, 15, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)319if checkResult == COL_BOTTOM320if player[currentPlayer].gravity == GRAVITY_GROUND321CallFunction(Player_Kill)322player[currentPlayer].invincibleTimer = 0323else324CallFunction(Player_SpikeHit)325end if326temp0 = 1327end if328329if temp0 < 1330BoxCollisionTest(C_TOUCH, object.entityPos, -3, 12, 3, 14, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)331if checkResult == true332CallFunction(Player_SpikeHit)333end if334end if335next336break337338case 8339foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)340BoxCollisionTest(C_SOLID, object.entityPos, -28, -16, 28, 16, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)341if checkResult == COL_BOTTOM342if player[currentPlayer].gravity == GRAVITY_GROUND343CallFunction(Player_Kill)344end if345end if346347if player[currentPlayer].yvel > -1348BoxCollisionTest(C_TOUCH, object.entityPos, -27, -17, 27, -12, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)349if checkResult == true350CallFunction(Player_SpikeHit)351end if352end if353next354break355356case 9357foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)358BoxCollisionTest(C_SOLID, object.entityPos, -16, -28, 15, 28, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)359if checkResult == COL_BOTTOM360if player[currentPlayer].gravity == GRAVITY_GROUND361CallFunction(Player_Kill)362end if363end if364365if player[currentPlayer].xvel <= 0366BoxCollisionTest(C_TOUCH, object.entityPos, 12, -27, 16, 27, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)367if checkResult == true368CallFunction(Player_SpikeHit)369end if370end if371next372break373374case 10375foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)376BoxCollisionTest(C_SOLID, object.entityPos, -15, -28, 16, 28, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)377if checkResult == COL_BOTTOM378if player[currentPlayer].gravity == GRAVITY_GROUND379CallFunction(Player_Kill)380end if381end if382383BoxCollisionTest(C_TOUCH, object.entityPos, -16, -27, -12, 27, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)384if checkResult == true385CallFunction(Player_SpikeHit)386end if387next388break389390case 11391foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)392temp0 = player[currentPlayer].yvel393BoxCollisionTest(C_SOLID, object.entityPos, -28, -16, 28, 15, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)394if checkResult == COL_BOTTOM395if player[currentPlayer].gravity == GRAVITY_GROUND396CallFunction(Player_Kill)397player[currentPlayer].invincibleTimer = 0398else399CallFunction(Player_SpikeHit)400end if401temp0 = 1402end if403404if temp0 < 1405BoxCollisionTest(C_TOUCH, object.entityPos, -27, 12, 27, 14, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)406if checkResult == true407CallFunction(Player_SpikeHit)408end if409end if410next411break412413case 12414foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)415BoxCollisionTest(C_SOLID, object.entityPos, -64, -16, 64, 16, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)416if checkResult == COL_BOTTOM417if player[currentPlayer].gravity == GRAVITY_GROUND418CallFunction(Player_Kill)419end if420end if421422if player[currentPlayer].yvel > -1423BoxCollisionTest(C_TOUCH, object.entityPos, -63, -17, 63, -12, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)424if checkResult == true425CallFunction(Player_SpikeHit)426end if427end if428next429break430431case 13432foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)433BoxCollisionTest(C_SOLID, object.entityPos, -16, -64, 15, 64, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)434if checkResult == COL_BOTTOM435if player[currentPlayer].gravity == GRAVITY_GROUND436CallFunction(Player_Kill)437end if438end if439440if player[currentPlayer].xvel <= 0441BoxCollisionTest(C_TOUCH, object.entityPos, 12, -63, 16, 63, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)442if checkResult == true443CallFunction(Player_SpikeHit)444end if445end if446next447break448449case 14450foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)451BoxCollisionTest(C_SOLID, object.entityPos, -15, -64, 16, 64, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)452if checkResult == COL_BOTTOM453if player[currentPlayer].gravity == GRAVITY_GROUND454CallFunction(Player_Kill)455end if456end if457458BoxCollisionTest(C_TOUCH, object.entityPos, -16, -63, -12, 63, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)459if checkResult == true460CallFunction(Player_SpikeHit)461end if462next463break464465case 15466foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)467temp0 = player[currentPlayer].yvel468BoxCollisionTest(C_SOLID, object.entityPos, -64, -16, 64, 15, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)469if checkResult == COL_BOTTOM470if player[currentPlayer].gravity == GRAVITY_GROUND471CallFunction(Player_Kill)472player[currentPlayer].invincibleTimer = 0473else474CallFunction(Player_SpikeHit)475end if476temp0 = true477end if478479if temp0 < 1480BoxCollisionTest(C_TOUCH, object.entityPos, -63, 12, 63, 14, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)481if checkResult == true482CallFunction(Player_SpikeHit)483end if484end if485next486break487488end switch489end event490491492event ObjectDraw493switch object.propertyValue494case 0 // 3 Spikes (Up)495case 1 // 3 Spikes (Right)496case 2 // 3 Spikes (Left)497case 3 // 3 Spikes (Down)498case 4 // 1 Spike (Up)499case 5 // 1 Spike (Right)500case 6 // 1 Spike (Left)501case 7 // 1 Spike (Down)502DrawSprite(object.propertyValue)503break504505case 8 // 3 Spikes (Spaced Out) (Up)506case 11 // 3 Spikes (Spaced Out) (Down)507temp1 = object.propertyValue508temp1 -= 4509DrawSprite(temp1)510temp0 = object.xpos511temp0 -= 0x180000512DrawSpriteXY(temp1, temp0, object.ypos)513temp0 += 0x300000514DrawSpriteXY(temp1, temp0, object.ypos)515break516517case 9 // 3 Spikes (Spaced Out) (Right)518case 10 // 3 Spikes (Spaced Out) (Left)519temp1 = object.propertyValue520temp1 -= 4521DrawSprite(temp1)522temp0 = object.ypos523temp0 -= 0x180000524DrawSpriteXY(temp1, object.xpos, temp0)525temp0 += 0x300000526DrawSpriteXY(temp1, object.xpos, temp0)527break528529case 12 // 6 Spikes (Spaced Out) (Up)530case 15 // 6 Spikes (Spaced Out) (Down)531temp1 = object.propertyValue532temp1 -= 8533temp0 = object.xpos534temp0 -= 0x3C0000535temp2 = 0536while temp2 < 6537DrawSpriteXY(temp1, temp0, object.ypos)538temp0 += 0x180000539temp2++540loop541break542543case 13 // 6 Spikes (Spaced Out) (Right)544case 14 // 6 Spikes (Spaced Out) (Left)545temp1 = object.propertyValue546temp1 -= 8547temp0 = object.ypos548temp0 -= 0x3C0000549temp2 = 0550while temp2 < 6551DrawSpriteXY(temp1, object.xpos, temp0)552temp0 += 0x180000553temp2++554loop555break556557end switch558end event559560561event ObjectStartup562LoadSpriteSheet("Global/Items.gif")563SpriteFrame(-20, -16, 40, 32, 84, 133)564SpriteFrame(-16, -20, 32, 40, 174, 133)565SpriteFrame(-16, -20, 32, 40, 174, 174)566SpriteFrame(-20, -16, 40, 32, 125, 133)567SpriteFrame(-4, -16, 8, 32, 84, 133)568SpriteFrame(-16, -4, 32, 8, 174, 133)569SpriteFrame(-16, -4, 32, 8, 174, 174)570SpriteFrame(-4, -16, 8, 32, 125, 133)571572temp0 = 0573Spikes_startDebugID = DebugMode_ObjCount574while temp0 < 16575SetTableValue(TypeName[Spikes], DebugMode_ObjCount, DebugMode_TypesTable)576SetTableValue(Spikes_DebugDraw, DebugMode_ObjCount, DebugMode_DrawTable)577SetTableValue(Spikes_DebugSpawn, DebugMode_ObjCount, DebugMode_SpawnTable)578DebugMode_ObjCount++579temp0++580loop581582foreach (TypeName[Spikes], arrayPos0, ALL_ENTITIES)583if object[arrayPos0].propertyValue > 15584object[arrayPos0].propertyValue &= 0xF585object[arrayPos0].state = SPIKES_HIDDEN586587// Orientation588temp0 = object[arrayPos0].propertyValue589temp0 &= 3590switch temp0591case 0592object[arrayPos0].xvel = 0593object[arrayPos0].yvel = 0x80000594break595596case 1597object[arrayPos0].xvel = -0x80000598object[arrayPos0].yvel = 0599break600601case 2602object[arrayPos0].xvel = 0x80000603object[arrayPos0].yvel = 0604break605606case 3607object[arrayPos0].xvel = 0608object[arrayPos0].yvel = -0x80000609break610end switch611end if612next613end event614615616// ========================617// Editor Events618// ========================619620event RSDKEdit621if editor.returnVariable == true622switch editor.variableID623case EDIT_VAR_PROPVAL // property value624checkResult = object.propertyValue625break626627case 0 // type628checkResult = object.propertyValue629checkResult &= 0xF630checkResult >>= 2631break632633case 1 // orientation634checkResult = object.propertyValue635checkResult &= 0xF636checkResult &= 3637break638639case 2 // moving640GetBit(checkResult, object.propertyValue, 7)641break642643end switch644else645switch editor.variableID646case EDIT_VAR_PROPVAL // property value647object.propertyValue = editor.variableValue648break649650case 0 // type651temp1 = 0x3652temp1 <<= 2653Not(temp1)654object.propertyValue &= temp1655656temp0 = editor.variableValue657temp0 &= 3658temp0 <<= 2659object.propertyValue |= temp0660break661662case 1 // orientation663temp1 = 0x3664Not(temp1)665object.propertyValue &= temp1666667temp0 = editor.variableValue668temp0 &= 3669object.propertyValue |= temp0670break671672case 2 // moving673CheckNotEqual(editor.variableValue, false)674SetBit(object.propertyValue, 7, checkResult)675break676677end switch678end if679end event680681682event RSDKDraw683temp7 = object.propertyValue684temp7 &= 0xF685686switch temp7687case 0 // 3 Spikes (Up)688case 1 // 3 Spikes (Right)689case 2 // 3 Spikes (Left)690case 3 // 3 Spikes (Down)691case 4 // 1 Spike (Up)692case 5 // 1 Spike (Right)693case 6 // 1 Spike (Left)694case 7 // 1 Spike (Down)695DrawSprite(temp7)696break697698case 8 // 3 Spikes (Spaced Out) (Up)699case 11 // 3 Spikes (Spaced Out) (Down)700temp1 = temp7701temp1 -= 4702DrawSprite(temp1)703temp0 = object.xpos704temp0 -= 0x180000705DrawSpriteXY(temp1, temp0, object.ypos)706temp0 += 0x300000707DrawSpriteXY(temp1, temp0, object.ypos)708break709710case 9 // 3 Spikes (Spaced Out) (Right)711case 10 // 3 Spikes (Spaced Out) (Left)712temp1 = temp7713temp1 -= 4714DrawSprite(temp1)715temp0 = object.ypos716temp0 -= 0x180000717DrawSpriteXY(temp1, object.xpos, temp0)718temp0 += 0x300000719DrawSpriteXY(temp1, object.xpos, temp0)720break721722case 12 // 6 Spikes (Spaced Out) (Up)723case 15 // 6 Spikes (Spaced Out) (Down)724temp1 = temp7725temp1 -= 8726temp0 = object.xpos727temp0 -= 0x3C0000728temp2 = 0729while temp2 < 6730DrawSpriteXY(temp1, temp0, object.ypos)731temp0 += 0x180000732temp2++733loop734break735736case 13 // 6 Spikes (Spaced Out) (Right)737case 14 // 6 Spikes (Spaced Out) (Left)738temp1 = temp7739temp1 -= 8740temp0 = object.ypos741temp0 -= 0x3C0000742temp2 = 0743while temp2 < 6744DrawSpriteXY(temp1, object.xpos, temp0)745temp0 += 0x180000746temp2++747loop748break749750end switch751end event752753754event RSDKLoad755LoadSpriteSheet("Global/Items.gif")756SpriteFrame(-20, -16, 40, 32, 84, 133)757SpriteFrame(-16, -20, 32, 40, 174, 133)758SpriteFrame(-16, -20, 32, 40, 174, 174)759SpriteFrame(-20, -16, 40, 32, 125, 133)760SpriteFrame(-4, -16, 8, 32, 84, 133)761SpriteFrame(-16, -4, 32, 8, 174, 133)762SpriteFrame(-16, -4, 32, 8, 174, 174)763SpriteFrame(-4, -16, 8, 32, 125, 133)764765AddEditorVariable("type")766SetActiveVariable("type")767AddEnumVariable("3 Spikes", 0)768AddEnumVariable("1 Spike", 1)769AddEnumVariable("3 Spikes (Spaced Out)", 2)770AddEnumVariable("6 Spikes (Spaced Out)", 3)771772AddEditorVariable("orientation")773SetActiveVariable("orientation")774AddEnumVariable("Up", 0)775AddEnumVariable("Right", 1)776AddEnumVariable("Left", 2)777AddEnumVariable("Down", 3)778779AddEditorVariable("moving")780SetActiveVariable("moving")781AddEnumVariable("false", false)782AddEnumVariable("true", true)783end event784785786