i would imagine it's LUA.
i dont even know what that stands for.
Lemur Undercarriage Access
Lesbian Underage Anal
Lithuanian Ukranian Alliance
Leopard Underpants Acquistions.
Lets Undermine America!
if somebody has sort of an idea of how it might be done, post plox! i need you to help me make my christmas present to spring.
santa com is coming to town
play a sound clip on game start from map resources
Moderator: Moderators
- Pressure Line
- Posts: 2283
- Joined: 21 May 2007, 02:09
Re: play a sound clip on game start from map resources
its 'Lua' not 'LUA', and it doesnt 'stand' for anything (because its not an acronym) it means 'moon' (or 'Moon' if you want to be really pedantic) in Portugese.
Re: play a sound clip on game start from map resources
More or less, you need this:
LuaGaia/main.lua
LuaGaia/Gadgets/play_a_sound.lua
LuaGaia/main.lua
Code: Select all
VFS.Include("LuaGadgets/gadgets.lua",nil, VFS.BASE)
Code: Select all
function gadget:GetInfo()
return {
name = "play_a_sound",
desc = "Plays a sound at game start",
author = "author",
date = "2009-11-28",
license = "Public domain",
layer = 10,
enabled = true
}
end
if not (gadgetHandler:IsSyncedCode()) then
gadget:GameStart()
Spring.PlaySoundFile("sounds/gamestart.wav")
end
end
Re: play a sound clip on game start from map resources
Lol kaiser, just check out my asteroid maps, they all have a music track playing at game start.
If you want to start track when game clock starts, then use the if spring.getgameseconds()>0 expression
If you want to start track when game clock starts, then use the if spring.getgameseconds()>0 expression
Re: play a sound clip on game start from map resources
Note that I'm not sure if gamestart is called in unsynced, I kind of flipped a coin about putting that 'not' in, remove it if so.
Re: play a sound clip on game start from map resources
LUOLPressure Line wrote:its 'Lua' not 'LUA'
Re: play a sound clip on game start from map resources
Just wondering, is it possible in the current Spring build for the sound to play in loop (repeat itself) and not just end after end of the track?Beherith wrote:Lol kaiser, just check out my asteroid maps, they all have a music track playing at game start.
If you want to start track when game clock starts, then use the if spring.getgameseconds()>0 expression
-
- Spring Developer
- Posts: 1254
- Joined: 24 Jun 2007, 08:34
Re: play a sound clip on game start from map resources
Yes. Search the sound forum.Achilla wrote:Just wondering, is it possible in the current Spring build for the sound to play in loop (repeat itself) and not just end after end of the track?Beherith wrote:Lol kaiser, just check out my asteroid maps, they all have a music track playing at game start.
If you want to start track when game clock starts, then use the if spring.getgameseconds()>0 expression