Hi, thanks to G T R i got the AppGameKit player working for my iPod touch... It works grate but some sprites won't load.
In the game im making, you are supposed to fly a helicopter and defend a island against enemy ships. But the island won't load. I tried to check if the sprite exists and if it dons't go back to loading the island again but for some reason the helicopter sprite turns into the island... An other strange bug I get is that each time I load the game onto my iPod the player says that the last error I got was that a sprite dosn't exist but the sprite isn't the same evry time...
SetRandomSeed ( timer ())
//used to store all variables for the enemies
Type Enemy
ID as integer
AtIsland as integer
Health As Float
X as float
Y as float
Angle As Float
DistanceXY as float
DistanceX as Float
DistanceY as float
DirectionX as float
DirectionY as float
endtype
//Storing Variables for all weapons
Type Weapon
ID as integer
Damage as Float
X as float
Y as Float
Angle as Float
EndType
Type XY
X as float
Y as float
endtype
Type Score
ShipsAtIsland
Kills
Damage
endtype
//Creating score variable
Score As score
//Creating the distance array
Dim Distance[10] as XY
rem Landscape App
SetDisplayAspect( 4.0/3.0 )
//*****Loading The background*****
//Creating the sea
Sea = LoadImage("sea.png")
CreateSprite(Sea,Sea)
SetSpriteDepth (Sea , 1000)
//Creating the island
Island = LoadImage("Island1.png")
CreateSprite(Island)
SetSpriteShape(island,3)
SetSpriteDepth (Island , 999)
SetSpriteScale(island,0.05,0.05)
SetSpritePosition(Island,30,30)
//*****Loading the player*****
Player=LoadImage("Cobra.png")
CreateSprite(Player,Player)
SetSpriteDepth (player, 2)
SetSpriteScale(player,0.015,0.015)
//*****Hellfire*****
//Loading the target sprite
TargetMark = LoadImage("TargetMark.png")
CreateSprite(TargetMark,TargetMark)
SetSpriteScale(TargetMark,0.05,0.05)
SetSpriteVisible (TargetMark,0)
//Place the target above the other sprites
SetSpriteDepth(TargetMark , 1)
//Creating Creating The Missile
//Using Target Mark For now
Hellfire as weapon
Hellfire.ID = LoadImage( "targetMark.png" )
CreateSprite (Hellfire.ID , Hellfire.ID)
SetSpriteScale (Hellfire.ID,0.05,0.05)
SetSpriteVisible (hellfire.ID,0)
//*************************************************
//Loading all enemies
//Creating the array
Dim Enemies[10] as Enemy
enemy = LoadImage ("Ship.png")
//Loading the image
For i=1 to 10
enemies[i].ID = CreateSprite(enemy)
SetSpriteScale(enemies[i].id,0.05,0.05)
SetSpriteShape(enemies[i].id,3)
next i
//********************************
That's all the code that loads sprites...
Srry about my english im from sweeden