Logo

Is it possible to switch announcer during gameplay?

Register Log In Back To Forums

Post #1 · Posted at 2016-08-27 10:00:54am 7.6 years ago

Offline leadbman
leadbman Avatar Member
263 Posts
Australia
Reg. 2016-02-01

"Working On: 5thMix BGA bgchanges"
Hi all,

Would any of you know if it would be possible to switch announcer during game play?

I found this command, but I'm not sure how I would go about using it:

GAMESTATE:ApplyGameCommand()

Ideally I'd like to have it set one announcer at the start of a song in certain circumstances and then set the announcer back to the original one at the end of the song.

Hope someone can help me work this out!
https://zenius-i-vanisher.com/ddrsig/18213.png?t=1510895050
Really need to add my scores to the tracker soon.
Always learning, always trying to push the boundaries of SM.

Post #2 · Posted at 2016-08-27 03:40:37pm 7.6 years ago

Offline Kyzentun
Kyzentun Avatar Member
3,209 Posts
United States
Reg. 2008-02-20

"I'm honestly pissed off."
ANNOUNCERConfusedetCurrentAnnouncer should change it.
silenttype01: Kyzentun is never harsh. He says it how it is.

GENERATION 24: The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.

Post #3 · Posted at 2016-08-27 08:46:16pm 7.6 years ago

Offline leadbman
leadbman Avatar Member
263 Posts
Australia
Reg. 2016-02-01

"Working On: 5thMix BGA bgchanges"
I tried doing that line in my code but it's just causing the whole .lua to error out/not run. Is there some special way I need to write this in? I'm fairly new to the .lua stuff for SM5, I've worked out most stuff now but this seems a bit more complicated than I understand right now.

ANNOUNCER:SetCurrentAnnouncer(Solo)

That's how I set it up, am I calling for the Solo announcer incorrectly?

If you could let me know how I should call it, that'd be great. Thanks for your help so far though!
https://zenius-i-vanisher.com/ddrsig/18213.png?t=1510895050
Really need to add my scores to the tracker soon.
Always learning, always trying to push the boundaries of SM.

Post #4 · Posted at 2016-08-27 09:22:09pm 7.6 years ago

Offline Kyzentun
Kyzentun Avatar Member
3,209 Posts
United States
Reg. 2008-02-20

"I'm honestly pissed off."
Do you know how to pass a string to a function? The SetCurrentAnnouncer function takes a string for the name of the announcer.
silenttype01: Kyzentun is never harsh. He says it how it is.

GENERATION 24: The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.

Post #5 · Posted at 2016-08-28 01:15:40am 7.6 years ago

Offline leadbman
leadbman Avatar Member
263 Posts
Australia
Reg. 2016-02-01

"Working On: 5thMix BGA bgchanges"
Not in terms of .lua functions (at least I don't think I do). Could you elaborate?
https://zenius-i-vanisher.com/ddrsig/18213.png?t=1510895050
Really need to add my scores to the tracker soon.
Always learning, always trying to push the boundaries of SM.

Post #6 · Posted at 2016-08-28 01:31:38am 7.6 years ago

Offline FlameyBoy
FlameyBoy Avatar Member
335 Posts
United States
Reg. 2011-03-09


Last updated: 2016-08-28 01:38am
ANNOUNCER:SetCurrentAnnouncer(Solo) is asking the game to set the current announcer to the contents of a Lua variable called Solo; in Lua, if you just type a name without any special punctuation around it and it's a valid variable name, it's treated as a variable name. Chances are, none of the code has put anything in that variable, and reading an unassigned Lua variable gives you nil. So, in essence you're trying to do ANNOUNCER:SetCurrentAnnouncer(nil), which causes an error. To create a string, you wrap it in double or single quotes, like so: ANNOUNCER:SetCurrentAnnouncer("Solo").

EDIT: Keywords are not variables, so there are a few things that are syntax errors if you try to use them like variable names (examples: if, for, else, function) and there are a few keywords that correspond to certain values, and you can't assign to them (nil, true, false).

Post #7 · Posted at 2016-08-28 02:52:20am 7.6 years ago

Offline leadbman
leadbman Avatar Member
263 Posts
Australia
Reg. 2016-02-01

"Working On: 5thMix BGA bgchanges"
You guys are the BEST!!! I finally got it working properly Big Grin

I've coded a "DDR Solo Mode" if only a single side joins, with proper side of screen animations etc. Now when you join as a single player, the announcer changes too and if you run versus mode it changes back. I am so happy that worked! It was the final piece of the puzzle of doing it justice. When I'm finished I'll put up a video or something.

Thanks again for your help, I really appreciate it!
https://zenius-i-vanisher.com/ddrsig/18213.png?t=1510895050
Really need to add my scores to the tracker soon.
Always learning, always trying to push the boundaries of SM.
Register Log In Back To Forums

0 User(s) Viewing This Thread (Past 15 Minutes)

©2006-2024 Zenius -I- vanisher.com -5th style- IIPrivacy Policy
Web Server: 3% · Database: 4% · Server Time: 2024-04-19 19:09:10
This page took 0.007 seconds to execute.
Theme: starlight · Language: englishuk
Reset Theme & Language