yasha,
it depends on your project and the # of sprites but you were already 1/2 way there when you wrote:
Quote: "SetSpritePosition(1, playerx, playery)"
what i mean is, you've given the player sprite x & y positions variable names. instead, give the player sprite itself a variable name (and the image, too, if you need it). IE:
ship = LoadImage("player_ship.png")
player = CreateSprite(ship)
then to manipulate:
SetSpritePosition(player, GetSpriteX(player)+1,GetSpriteY(player)+1)
...for example.
basically, AppGameKit gives you the
option of declaring the image, sprite, object #'s as you have (in this case "1" for image and sprite, above) or letting AppGameKit decide the object #'s while you reference them with variable "names" as you're wanting to do.
so, if you have 1 player sprite, see above. and, if you have a number of enemies, you could do similar with an array:
EnemyImage = LoadImage("enemy.png")
Enemy as Integer [10]
for x = 1 to 10
Enemy[x] = CreateSprite(EnemyImage)
next x
which you can reference similarly:
SetSpritePosition(Enemy[1],100,100)
...for example.
beyond that, if you want to give your enemies additional characteristics (like defining their speed, rate of fire, etc), then you would want to use
Types to define, organize and reference each, as fubar suggests.
HERE is a basic example of that where i've given 20 different sprites a constant direction of travel using
Types.
in other words, you don't (ever) have to reference the integer/object id itself.
hope that helps