Path: blob/main/Scripts/FlowerPod/PodSeed.txt
1319 views
//------------------Sonic CD Pod Seed Script------------------//1//--------Scripted by Christian Whitehead 'The Taxman'--------//2//-------Unpacked By Rubberduckycooly's Script Unpacker-------//34// Aliases5#alias Object.Value0 : Object.Timer6#alias Object.Value1 : Object.ParentPod7#alias Object.Value2 : Object.XVelocity8#alias Object.Value3 : Object.YVelocity910// Flower States11#alias 2 : FLOWER_SEED_PLANTED_11213// Collision Sides14#alias 0 : CSIDE_FLOOR1516// Player17#alias 0 : PLAYER_SONIC_A18#alias 1 : PLAYER_TAILS_A1920// Control Mode21#alias -1 : CONTROLMODE_NONE2223// Property Values24#alias 1 : TRIGGER_RESULTS252627sub ObjectMain2829// Animate the seed30Object.Frame = Object.Timer31Object.Frame /= 332Object.Timer++33Object.Timer %= 183435// Update movements36Object.XPos += Object.XVelocity37Object.YPos += Object.YVelocity38Object.YVelocity += 0x40003940// Before landing, the object has to be going at a rate of at least 6px per frame41if Object.YVelocity > 0x6000042ObjectTileCollision(CSIDE_FLOOR, 0, 8, 0)43if CheckResult == true44if Object.PropertyValue == TRIGGER_RESULTS45ArrayPos0 = Object.ParentPod46Object[ArrayPos0].State++47Player.ControlMode = CONTROLMODE_NONE48end if4950// Grow into a Flower51ResetObjectEntity(Object.EntityNo, Flower_TypeNo, 0, Object.XPos, Object.YPos)52Object.YPos += 0x8000053Object.State = FLOWER_SEED_PLANTED_154Object.Frame = 255Object.DrawOrder = 456end if57end if5859end sub606162sub ObjectDraw63DrawSprite(Object.Frame)64end sub656667sub ObjectStartup68if Stage.PlayerListPos == PLAYER_SONIC_A69LoadSpriteSheet("Global/Items2.gif")70end if71if Stage.PlayerListPos == PLAYER_TAILS_A72LoadSpriteSheet("Global/Items2_t.gif")73end if74#platform: Use_Origins75if Stage.PlayerListPos == PLAYER_KNUCKLES76LoadSpriteSheet("Global/Items2_k.gif")77end if78if Stage.PlayerListPos == PLAYER_AMY79LoadSpriteSheet("Global/Items2_a.gif")80end if81#endplatform8283// Seed Frames84SpriteFrame(-8, -8, 16, 16, 83, 66)85SpriteFrame(-8, -8, 16, 16, 83, 83)86SpriteFrame(-8, -8, 16, 16, 83, 100)87SpriteFrame(-8, -8, 16, 16, 83, 117)88SpriteFrame(-8, -8, 16, 16, 83, 83)89SpriteFrame(-8, -8, 16, 16, 83, 134)90end sub919293// ========================94// Editor Subs95// ========================9697sub RSDKDraw98DrawSprite(0)99end sub100101102sub RSDKLoad103LoadSpriteSheet("Global/Items2.gif")104SpriteFrame(-8, -8, 16, 16, 83, 66)105106// Although used by the object, it's not to be set from the editor107SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")108end sub109110111