ID:157306
 
when a mob logs in they hear this

mob/Login()
usr << sound('offtoneverland.ogg')


thats fine, my game has 4 nations to choose from when creating a player these are; furion, ancient, arcadian & sky pirate.When they select a nation and click the Finish button to enter the game from the start turf on the map, I want the main theme music to stop so id use the code
     usr << sound(null)

stops it, next Depending on the nation selected, I want to make a specific song play depending on which nation was picked, example being;
if furion - song a
if ancient - song b
if arcadian - song c
if sky pirate - song d
now i figure ill have to have Vars for the nations like this
mob
var/furion=0
var/ancient=0
var/arcadian=0
var/sky_pirate=0</b>

and finally my finish button on character select

Finished
icon='Finished.bmp'
density=1
opacity=1
layer=7
Click()
usr.loc=locate(/turf/landscape/start)
usr << sound(null
//if furion - song a
//if ancient - song b
//if arcadian - song c
//if sky pirate - song d


I assume i have to add an If statement to this area but im having trouble putting together the correct type of if statement, if statements arent my strongest suits

So any help would be appreciated thanks
has ANYONE got a helpful comment surely it isnt impossible -,-

the theory is sound in my head i just need help putting it together, if statements arent my strongest suit, i dont quite get the uses and types of it all EVEN after reading it
In response to Thorpeous
Thorpeous wrote:
has ANYONE got a helpful comment

Yeah, using dm tags makes DM code more readable.

http://www.byond.com/developer/forum/?action=forum_help
In response to Demon_F0rce
Demon_F0rce wrote:
Thorpeous wrote:
has ANYONE got a helpful comment

Yeah, using dm tags makes DM code more readable.

http://www.byond.com/developer/forum/?action=forum_help

ok point made, edit done, any other tips?
In response to Thorpeous
Actually, you seem to have missed my point. It should come out like this:

mob/verb
Hi()
world<<"[usr] says, \"Hi!\"" //See?
In response to Demon_F0rce
ok editted, and hopefully right, do you think u could help me with the problem?
In response to Thorpeous
so then how about it, anyone got a helping hand seen as I am not so good with if statements and I am not quite sure how to put this one down in code format, I understand if statements to a degree, but thus far my attempts to make this music switch statement have not been going very well

same problem

when a mob logs in they hear this

mob/Login()
usr << sound('offtoneverland.ogg')


thats fine, my game has 4 nations to choose from when creating a player these are; furion, ancient, arcadian & sky pirate.When they select a nation and click the Finish button to enter the game from the start turf on the map, I want the main theme music to stop so id use the code
     usr << sound(null)

stops it, next Depending on the nation selected, I want to make a specific song play depending on which nation was picked, example being;
if furion - song a
if ancient - song b
if arcadian - song c
if sky pirate - song d
now i figure ill have to have Vars for the nations like this
mob
var/furion=0
var/ancient=0
var/arcadian=0
var/sky_pirate=0</b>

and finally my finish button on character select

Finished
icon='Finished.bmp'
density=1
opacity=1
layer=7
Click()
usr.loc=locate(/turf/landscape/start)
usr << sound(null)
//if furion - song a
//if ancient - song b
//if arcadian - song c
//if sky pirate - song d


I assume i have to add an If statement to this area but im having trouble putting together the correct type of if statement, if statements arent my strongest suits

So any help would be appreciated thanks
In response to Thorpeous
Thorpeous wrote:
so then how about it, anyone got a helping hand seen as I am not so good with if statements and I am not quite sure how to put this one down in code format, I understand if statements to a degree, but thus far my attempts to make this music switch statement have not been going very well

same problem

when a mob logs in they hear this

mob/Login()
> usr << sound('offtoneverland.ogg')

thats fine, my game has 4 nations to choose from when creating a player these are; furion, ancient, arcadian & sky pirate.When they select a nation and click the Finish button to enter the game from the start turf on the map, I want the main theme music to stop so id use the code
     usr << sound(null)

stops it, next Depending on the nation selected, I want to make a specific song play depending on which nation was picked, example being;
if furion - song a
if ancient - song b
if arcadian - song c
if sky pirate - song d
now i figure ill have to have Vars for the nations like this
mob
> var/furion=0
> var/ancient=0
> var/arcadian=0
> var/sky_pirate=0</b>

and finally my finish button on character select

Finished
> icon='Finished.bmp'
> density=1
> opacity=1
> layer=7
> Click()
> usr.loc=locate(/turf/landscape/start)
> usr << sound(null)
> //if furion - song a
> //if ancient - song b
> //if arcadian - song c
> //if sky pirate - song d

I assume i have to add an If statement to this area but im having trouble putting together the correct type of if statement, if statements arent my strongest suits

So any help would be appreciated thanks
In response to Thorpeous
Bumping your thread five times a day is a great way to make people ignore you.
In response to Garthor
there ignoring it anyway -.-, thought demon f0rce might have helped but he just wanted to rant at me how terrible my thread layout was then he dissapeared -.-
In response to Thorpeous
My prefernce would be when they select a class assign it in a varible, lets call this class.

mob/var/class = "furion"

Then we use this varible to assign them their new song using the file proc.
Finished
> > icon='Finished.bmp'
> > density=1
> > opacity=1
> > layer=7
> > Click()
> > usr.loc=locate(/turf/landscape/start)
> > usr << sound(null)
> > usr << sound(file("[class].ogg"))

This would play the file furion.ogg .
In response to Thorpeous
Thorpeous wrote:
there ignoring it anyway

Then why do you think bumping it will help? Since moderators haven't told you, I will: The rule is that you can only bump a thread once its off the front page and only if it has been off the front page for twenty-four hours. And that's the front page of the particular forums (i.e., for this thread here, not here.