Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Lua sleep()
Re: Lua sleep() [message #450342 is a reply to message #450339] Sat, 30 July 2011 11:33 Go to previous messageGo to previous message
Intradox is currently offline  Intradox
Messages: 60
Registered: February 2011
Location: United States
Karma:
Recruit
I'm doing it as global thing, not so each player has different music playing, which sounds like what you want me to do. So I attached it to a daves arrow, and it plays the first song, but it doesn't go onto the next song.

function Jukebox:Timer_Expired()
	if song == nil then
		song = 0
	end
	if playlist[song + 1] ~= nil then
		song = song + 1
	else
		song = 1 
	end
	InputConsole("msg [DarkEVA]: Now playing %s.", playlist[song])
	currentsong = playlist[song]
	players = Get_All_Players()
	for i = 1, #players do
		pID = FindPlayerName("FindID", players[i])
		music = Players[Get_Player_Name_By_ID(pID)]
		if music == "on" then
			InputConsole("musicp %d %s", pID, playlist[song])
		end
	end
	Start_Timer(ID, obj, playlisttimes[song], 1)
end


For the Start_Timer, what would I have to put for ID and obj? I think this is where its messed up.


Not pro enough at renegade to snipe.

[Updated on: Sat, 30 July 2011 11:50]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Lua. Answers.
Next Topic: What's the TFD Renegade registry path?
Goto Forum:
  


Current Time: Fri Dec 20 13:47:00 MST 2024

Total time taken to generate the page: 0.00736 seconds