Welcome, Guest. Please login or register.
Did you miss your activation email?
November 21, 2024, 09:16:56 PM
Home Help Login Register
News: Zombie Master 2 discussion

Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: Autorun Lua Questions
Pages: [1]
Author Topic: Autorun Lua Questions  (Read 9812 times)
nrich588
Poster

Posts: 253

WzG Owner


« on: December 11, 2011, 04:03:21 AM »

resource.AddFile("sound/tswin2.wav")
resource.AddFile("sound/iswin2.wav")

local function PlayMusic(wintype)
  if wintype != WIN_TRAITOR then
      BroadcastLua('surface.PlaySound("tswin2.wav")')
    else
    BroadcastLua('surface.PlaySound("iswin2.wav")')
  end
end
hook.Add("TTTEndRound", "MyMusic", PlayMusic)


I want this to instead of playing at the end of each round, to play when the map switches, what do I need to change?
Mr. Gash
Poster

Posts: 382


www.nonerdsjustgeeks.com


« Reply #1 on: December 11, 2011, 04:51:39 AM »

When the vote starts, or when the new map loads (Let me point out you can't have it 'when the map loads', you would have to make it play when a person joins, and that wouldn't always be due to a map change)? And you're giving an example of a completely different script, it makes more sense to just ask how to have a sound play when <topic>.
nrich588
Poster

Posts: 253

WzG Owner


« Reply #2 on: December 11, 2011, 05:44:23 AM »

I want it to play when the votemap screen pops up.
GrayScare0
Poster

Posts: 404


« Reply #3 on: December 11, 2011, 05:01:23 PM »

Just curious: What were you thinking of adding for the votemap screen?  I do hope it is a segment from this.
nrich588
Poster

Posts: 253

WzG Owner


« Reply #4 on: December 11, 2011, 08:11:51 PM »

I'm thinking more of something more ambient, something from Video Co-Pilots ambient tracks. I'm not sure but i'll post the sound bite here once I do figure it out.
GrayScare0
Poster

Posts: 404


« Reply #5 on: December 11, 2011, 09:44:05 PM »

I'm thinking more of something more ambient, something from Video Co-Pilots ambient tracks. I'm not sure but i'll post the sound bite here once I do figure it out.

Don't worry; it was a joke.  Rocking the boat sounds kind of like rocking the vote.  It would get old quite quickly.
nrich588
Poster

Posts: 253

WzG Owner


« Reply #6 on: December 11, 2011, 09:55:48 PM »

Do I just change the hook TTTEndRound to TTTMapChange or whatever that hook is.
Mr. Gash
Poster

Posts: 382


www.nonerdsjustgeeks.com


« Reply #7 on: December 11, 2011, 10:31:20 PM »

Try TTTDelayRoundStartForVote
« Last Edit: December 11, 2011, 10:32:25 PM by Mr. Gash »
nrich588
Poster

Posts: 253

WzG Owner


« Reply #8 on: December 11, 2011, 11:42:53 PM »

That would just delay the start of the vote for 30 seconds.
Anonymous
Poster

Posts: 126


« Reply #9 on: December 13, 2011, 08:02:15 PM »

No, That would delay the ROUND from Starting for a vote.

Anonymous
Poster

Posts: 126


« Reply #10 on: December 13, 2011, 08:04:13 PM »

Uhm, Your Script is wintype that is NOTHING like what you need for this.

Pages: [1]
Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: Autorun Lua Questions « previous next »
Jump to:  


Login with username, password and session length

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
Page created in 0.008 seconds with 18 queries.