I have a small problem
I create my rocks and coins with this array
I then hit each rock and then the coins delete.
I then walk and my ground is also deleted
Somehow my invisible ground for collision is in the same array but it is not.
For x = 0 to 18
ThisRock.ID = CreateSprite(Grid1) : SetSpriteSize(ThisRock.ID,10,10)
SetSpritePhysicsOn(ThisRock.ID,1) : SetSpriteGroup(ThisRock.ID,-10)
inc m,105
if m=>700 then inc m,200.0
if m=>900 then inc m,50.0
if m=>1700 then inc m,300.0
if m=>1900 then inc m,50.0
SetSpritePhysicsFriction(ThisRock.ID,0.00005)
ThisRock.Coins = (Random(0,8))
Rocks.InsertSorted(ThisRock)
Next x
This is me creating my ground
ground_0=createsprite(0)
setspritesize(ground_0,5000,10)
setspriteposition(ground_0,0,90)
setspritephysicson(ground_0,1)
SetSpriteTransparency(ground_0,1)
SetSpriteColorAlpha( ground_0,50 )
SetSpriteVisible (ground_0,0 )
How is my ground being mixed in with a set array?
Edit:::
This is how I'm deleting the coins in its own array.
For x = MyCollectedCoins.Length to 0 Step -1
if GetSpriteExists(MyCollectedCoins[x].ID)
inc MyCollectedCoins[x].Timers
if MyCollectedCoins[x].Timers=>40
SetSpritePhysicsOff(MyCollectedCoins[x].ID)
endif
if MyCollectedCoins[x].Timers=>50
DeleteSprite(MyCollectedCoins[x].ID)
MyCollectedCoins[x].Timers=0
endif
EndIf
Next x