Weird, ok so now I'm making boxes (For a health bar) and grabbing them, but when I paste them it just pastes the same image as the energy core image.
loadmedia:
player.img = GetFreeImage()
global energycore = GetFreeImage()
global healthbar = GetFreeImage()
global healthbarsprite = GetFreeSprite()
global healthbarframe = GetFreeImage()
box 0,0,3,6, rgb(255,0,0), rgb(255,0,0), rgb(255,0,0), rgb(255,0,0)
get image healthbar, 0, 0, 4, 7
box 0,0,4,7
get image healthbarframe, 0, 0, 5, 8
load image "media\spaceship.png", player.img
load image "media\Energy_Core.bmp", energycore
cls
return
Ok nevermind, I put cls before the second box grab... now it's displaying nothing....
Also, the player isn't showing up.
do
cls
`playerinput() Functions are for later.
`enemyengine()
`checks()
background()
GUI()
sprite player.spr, player.x, player.y, player.img
sync
loop
I don't see why, here's the setupplayer subroutine.
setupplayer:
player.state = true
player.spr = GetFreeSprite()
player.health = 100
player.energy = 10
sprite player.spr, 0, 0, player.img
player.w = sprite width(player.spr)
player.h = sprite height(player.spr)
player.x = 0 + player.w/2
player.y = 0 + screen height()/2
offset sprite player.spr, player.w, player.h
mirror sprite player.spr
return
And you have the loadmedia subroutine somewhere on this topic.
Oh yeah, and last one, when I paste all my energy cores one energy core is just randomly on the screen and I don't know how to get it off.
EDIT: Hmmm... I edited my star thing to be like yours but no stars are showing.
setupbackground:
dim star(1000) as entity
global starimg = GetFreeImage()
dot 1, 1
get image starimg, 0, 0, 2, 2, 1
for i = 1 to 1000
star(i).x = rnd(screen width())
star(i).y = rnd(screen height())
next i
repeat
collided = false
for a = 1 to 1000
for b = 1 to 1000
if a <> b
if star(a).x = star(b).x
if star(a).y = star(b).y
collided = true
star(a).x = rnd(screen width())
star(a).y = rnd(screen height())
endif
endif
endif
next b
next a
until collided = false
for i = 1 to 1000
paste image starimg, star(i).x, star(i).y
next i
wait key
return
(The wait key is for testing)
BTW: There seems to be a bit of a pattern with things not showing up DX
I wish I wasn't gone so long, maybe then I wouldn't need so much help lol.
-------------------------------------------------------------