Path: blob/master/Sonic 2/Scripts/Mission/SetRingCount.txt
1478 views
// ----------------------------------1// RSDK Project: Sonic 22// Script Description: SetRingCount Object3// Script Author: Christian Whitehead/Simon Thomley4// Unpacked by Rubberduckycooly's script unpacker5// ----------------------------------67// This Object is used in Mission "Super Sonic Finish" - M036 - Mission_Zone098// This Object is also used in its follow-up DLC Mission, "Extreme! Super Sonic Finish" - M104 - DLC_Zone06910// This is normally paired with the SuperSonic Object to make the Player start Super with a certain amount of rings,11// though it can work alone if needed (As S1 does in its LZ Mission)1213// ========================14// Aliases15// ========================1617// To be set from the Editor18private alias object.value0 : object.ringCount1920// Player Aliases21private alias object.value0 : player.rings222324// ========================25// Events26// ========================2728event ObjectStartup29temp0 = 030foreach (TypeName[SetRingCount], arrayPos0, ALL_ENTITIES)31if temp0 == 032temp0 = object[arrayPos0].ringCount33end if34next3536if temp0 != 037player[0].rings = temp038end if39end event404142// ========================43// Editor Events44// ========================4546event RSDKDraw47DrawSprite(0)48end event495051event RSDKLoad52LoadSpriteSheet("Global/Items.gif")53SpriteFrame(-8, -8, 16, 16, 1, 1)5455SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")56SetVariableAlias(ALIAS_VAR_VAL0, "ringCount")57end event585960