papam77 Posted June 19, 2013 Share Posted June 19, 2013 Hello, why it doesn't work? function lobby(player) -- Effects local bg = playSound("sounds/sea.mp3") setSoundVolume(bg, 1.0) -- Design lobby = guiCreateStaticImage(0.00, 0.00, 1.00, 1.00, "images/lobbyBG.png", true) end addCommandHandler ("system", lobby) Link to comment
Moderators IIYAMA Posted June 19, 2013 Moderators Share Posted June 19, 2013 well as far I can see it have to work. You sure the sound is there?(and in the sound/ folder) I only see one other mistake(it is client not serverside): function lobby(player) Must be: function lobby(command) -- string commandName, [string arg1, string arg2, ...] Link to comment
Moderators IIYAMA Posted June 19, 2013 Moderators Share Posted June 19, 2013 doesn't work Can't you read? other mistake script is starting? /debugscript 3 else show your meta. Link to comment
papam77 Posted June 19, 2013 Author Share Posted June 19, 2013 Error: WARNING: eag/lobby_c.lua:4: Bad 'sound/player' pointer @ 'setSoundVolume'(1) lobby_c.lua function lobby(system) -- Effects local bg = playSound("sound/sea.mp3") setSoundVolume(bg, 1.0) -- Design lobby = guiCreateStaticImage(0.00, 0.00, 1.00, 1.00, "images/lobbyBG.png", true) end addCommandHandler ("system", lobby) meta.xml "DeeJay" type="gamemode" /> Link to comment
PaiN^ Posted June 19, 2013 Share Posted June 19, 2013 It should be working fine ! check your files, Maybe there buged . Link to comment
Dealman Posted June 19, 2013 Share Posted June 19, 2013 Make sure that the path to the file is correct and you didn't make a typo. Also, check to make sure that the mp3 file is not corrupted - and at last, remember to restart the resource after every change you make. So long as the file exists in ResourceName/sound/ it should be working. Also, there's no need to set the volume to 1 since that is the default value anyway. Link to comment
papam77 Posted June 19, 2013 Author Share Posted June 19, 2013 Now works it! And why scale doesn't work? guiCreateFont(caa, "fonts/font.ttf", 20 ) And text size is still same Link to comment
iPrestege Posted June 19, 2013 Share Posted June 19, 2013 guiCreateFont("fonts/font.ttf", 20 ) cca = ? Link to comment
iPrestege Posted June 19, 2013 Share Posted June 19, 2013 element guiCreateFont ( string filepath[, int size=9 ] ) Link to comment
papam77 Posted June 19, 2013 Author Share Posted June 19, 2013 Version 1: caa = guiCreateLabel(0.00, 0.00, 1.00, 0.14, "Choose an Arena", true) guiCreateFont(caa, "fonts/font.ttf", 20 ) guiLabelSetHorizontalAlign(caa, "center", false) guiLabelSetVerticalAlign(caa, "center") Version 2: caa = guiCreateLabel(0.00, 0.00, 1.00, 0.14, "Choose an Arena", true) caa= guiCreateFont("fonts/font.ttf", 20 ) guiLabelSetHorizontalAlign(caa, "center", false) guiLabelSetVerticalAlign(caa, "center") And doesn't work... Link to comment
iPrestege Posted June 19, 2013 Share Posted June 19, 2013 caa = guiCreateLabel(0.00, 0.00, 1.00, 0.14, "Choose an Arena", true) guiSetFont ( caa,guiCreateFont("fonts/font.ttf", 20 ) ) guiLabelSetHorizontalAlign(caa, "center", false) guiLabelSetVerticalAlign(caa, "center") Link to comment
papam77 Posted June 19, 2013 Author Share Posted June 19, 2013 Yeah, work it Ty. last ask: How can set song repeat ? Again, again and again. Link to comment
papam77 Posted June 19, 2013 Author Share Posted June 19, 2013 Yes. I have this now local bg = playSound("sound/sea.mp3") setSoundVolume(bg, 1.0) And it doesn't repeat it Link to comment
iPrestege Posted June 19, 2013 Share Posted June 19, 2013 How long the time i mean the sound play time. Link to comment
papam77 Posted June 19, 2013 Author Share Posted June 19, 2013 It can play cca 11351351351 hours. Until player select arena Link to comment
iPrestege Posted June 19, 2013 Share Posted June 19, 2013 Yes but you can use a timer destroy after for example let's say 1 minutes then start it again you get it? Link to comment
denny199 Posted June 19, 2013 Share Posted June 19, 2013 Chek the parameters element playSound ( string soundPath, [ bool looped = false ] ) So: local bg = playSound("sound/sea.mp3", true) setSoundVolume(bg, 1.0) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now