Help with my "RPG"?

Blitz3D Forums/Blitz3D Beginners Area/Help with my "RPG"?

Nike(Posted 2009) [#1]
Hi well um im trying to make a online rpg (dont know what to call it cause there is going to be a 30 people server limit) and i need help with sounds. I have a 14 second loop song called song.wav
and i need it to play in my code while the people are doing stuff. Here is my unfinished code:



Nike(Posted 2009) [#2]
Ok wow ive been working 3 stright hours and i need more help :(
1) I need help overwriting saved files...
2) How would i get my person to move screen to screen?
Like i have 6 screens and you need to be in one to get to another one. So i have arrows and if you hit the wasd keys (w is up,a is left ect.) how would i move? Its in level draw i think... heres new code...



_PJ_(Posted 2009) [#3]
For the sound thing, Load the sound to memory and set it to loop with:

	MySound=LoadSound(Sound_Filename$)
	LoopSound MySound

Just before the game-loop where it should play:
	MySoundChannel=PlaySound(MySound) 


When it's time to stop the music playing (FOr example, all players are established)
	StopChannel MySoundChannel



_PJ_(Posted 2009) [#4]
I'm not sure what the meaning is of a lot of the code, it seems pretty messy to me:

Function leveldraw() 
image$=background1

If image$=background1
If KeyHit(17) ;w
image$=background3
EndIf
EndIf 

If image$=background3
If KeyHit(17) ;w
image$=background5
If KeyHit(30) ;a
image$=background4
If KeyHit(31)
image$=background1
EndIf
EndIf
EndIf
EndIf 



Background1 Background2 etc. ARE ALL THE SAME Image ("background.bmp")
And in the snippet above, you are seeing if "image$" (A string) is equivalent to the Image handle?

Also the entrie funciton begins with:
image$=background1

If image$=background1
If KeyHit(17) ;w
image$=background3
EndIf
EndIf 


So Image$ WILL ONLY BE = background1, meaning the only possible outcome is that w must be pressed in order to change the value of Image$ to further affect the following If's... Very unlikely anyone has reflexes quick enough to press the 'correct' keys in the 'correct' order to achieve much.


Nike(Posted 2009) [#5]
Thanks for the help but for the background thing, well i am going to make this multiplayer and load more images. For each background there is going to be something differnt on there that i use the drawimage command for. Here is a pic of the map of the game...

how would you move the person screen to screen if it has an arrow on it (Red block)? For the music i need it to play the whole game. Loop after loop after loop.