31
GLBasic - en / Re: Happy Christmas All!
« on: 2009-Dec-24 »
merry christmas from the mountains too
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
PLAYMUSIC "./isdo/sfx/music.ogg",TRUE
MUSICVOLUME 0.8
Steinbock: Are you saying that the game stutters for you too?Yes.
ObjectADD(ID_POWERUP,Object.PosX[ix],Object.PosY[ix])
The script for the power-up item on the other hand you will find in file items.gbas. CASE ID_POWERUP
SELECT Object.State[ix]
CASE 1
IF Object.PosX[ix]>-16
DEC Object.PosX[ix],0.5
ELSE
Object.State[ix]=0
ENDIF
ENDSELECT
DRAWSPRITE SPR_POWERUP,Object.PosX[ix],Object.PosY[ix]
SetCollBox(ix,0,0,15,15)
IF CheckCollPlayer(ix)=COLL_PLAYER
Object.State[ix]=0
PLAYSOUND(SFX_EXTRA,GetPan(Object.PosX[ix]),0.7)
SPR_SHOT=24
ENDIF
ENDSELECT
We check this item on collision with the player. If a collision occurs, we close the item in the objectlist and change our shot. LOADSOUND "./isdo/sfx/shot.wav",SFX_SHOT,4
LOADSOUND "./isdo/sfx/explosion.wav",SFX_EXPLOSION,4
LOADSOUND "./isdo/sfx/extra.wav",SFX_EXTRA,4
Thereafter we load our backgroundmusic, setting the volume and play it. PLAYMUSIC "./isdo/sfx/music.wav",TRUE
MUSICVOLUME 0.9
PLAYSOUND(SFX_EXTRA,GetPan(Object.PosX[ix]),0.7)
the soundeffect with ID SFX_EXTRA will be played with a volume of 0.7.Steuerung->WIN:
startmenu: cursorkey up/down = menucursor up and down
"x"-key = select menuentry
game: cursorkey up/down = move
"x"-key = shoot
ENTER-key = return to startmenu
And now enjoy!!