Path: blob/master/Sonic 1/Scripts/Mission/SetRingCount.txt
1483 views
// ----------------------------------1// RSDK Project: Sonic 12// Script Description: SetRingCount Object3// Script Author: Christian Whitehead/Simon Thomley4// Unpacked by Rubberduckycooly's script unpacker5// ----------------------------------67// ========================8// Aliases9// ========================1011private alias object.value0 : object.ringCount1213// Player Aliases14private alias object.value0 : player.rings151617// ========================18// Events19// ========================2021event ObjectStartup22temp0 = 02324// Find all SetRingCount objects in the level, look at their held Ring Count25foreach (TypeName[SetRingCount], arrayPos0, ALL_ENTITIES)26if temp0 == 027temp0 = object[arrayPos0].ringCount28end if29next3031// And then give the Player as much rings as the Object demands32if temp0 != 033player[0].rings = temp034end if35end event363738// ========================39// Editor Events40// ========================4142event RSDKDraw43DrawSprite(0)44end event454647event RSDKLoad48LoadSpriteSheet("Global/Items.gif")49SpriteFrame(-8, -8, 16, 16, 1, 1)5051SetVariableAlias(ALIAS_VAR_VAL0, "ringCount")52end event535455