Path: blob/master/Sonic 2/Scripts/Mission/SCZSpeedUp.txt
1480 views
// ----------------------------------1// RSDK Project: Sonic 22// Script Description: SCZSpeedUp Object3// Script Author: Christian Whitehead/Simon Thomley4// Unpacked by Rubberduckycooly's script unpacker5// ----------------------------------67// This Object is used in Mission "Tornado Flyby" - M040 - Mission_Zone1089// ========================10// Events11// ========================1213event ObjectUpdate14// What this object does is make every projectile move just a tad bit faster, at double the projectile's standard speed1516// Cycle through the entire temp object list and update its objects, looking for projectiles17arrayPos0 = 0x42018while arrayPos0 < 0x4A019switch object[arrayPos0].type20case TypeName[Turtloid Shot]21// Turtloid Shot xvel is normally -0x8000, this is double that22object[arrayPos0].xvel = -0x1000023break2425case TypeName[Nebula Bomb]26// Making it fall faster, apply 2x gravity27// (The first round of `+= 0x3800` is already done in the Nebula Bomb script)28object[arrayPos0].yvel += 0x380029break3031case TypeName[OctusShot] // Normally has a name of [Octus Shot] in OOZ, but WFZ removes the space32// Octus Shot xvel is normally +/- 0x20000, is this again double that33if object[arrayPos0].xvel < 034object[arrayPos0].xvel = -0x4000035else36object[arrayPos0].xvel = 0x4000037end if38break3940case TypeName[AsteronSpike] // Similar case here, normally [Asteron Spike] but WFZ's entry removes the space41switch object[arrayPos0].propertyValue42case 043// Normally has a yvel of -0x40000 (and an xvel of 0)44object[arrayPos0].yvel = -0x8000045break4647case 148// Normally has an xvel of +/- 0x30000, and a yvel of -0x1000049if object[arrayPos0].xvel < 050object[arrayPos0].xvel = -0x6000051else52object[arrayPos0].xvel = 0x6000053end if54object[arrayPos0].yvel = -0x2000055break5657case 258// Normally has an xvel of +/- 0x30000, and a yvel of -0x3000059if object[arrayPos0].xvel < 060object[arrayPos0].xvel = -0x6000061else62object[arrayPos0].xvel = 0x6000063end if64object[arrayPos0].yvel = 0x6000065break6667end switch // object[arrayPos0].propertyValue68break6970end switch // object[arrayPos0].type7172arrayPos0++73loop74end event757677event ObjectStartup78foreach (TypeName[SCZSpeedUp], arrayPos0, ALL_ENTITIES)79object[arrayPos0].priority = PRIORITY_ACTIVE80next81end event828384// ========================85// Editor Events86// ========================8788event RSDKDraw89DrawSprite(0)90end event919293event RSDKLoad94LoadSpriteSheet("Global/Display.gif")95SpriteFrame(-16, -16, 32, 32, 1, 143)9697SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")98end event99100101