ポスト #1 · 2016-08-27 10:00:54amにポスト 7.7年前
leadbman | |
---|---|
Member | |
263 ポスト | |
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!
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!
ポスト #2 · 2016-08-27 03:40:37pmにポスト 7.7年前
Kyzentun | |
---|---|
Member | |
3,209 ポスト | |
Reg. 2008-02-20 | |
"I'm honestly pissed off." |
ANNOUNCERetCurrentAnnouncer should change it.
ポスト #3 · 2016-08-27 08:46:16pmにポスト 7.7年前
leadbman | |
---|---|
Member | |
263 ポスト | |
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!
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!
ポスト #4 · 2016-08-27 09:22:09pmにポスト 7.7年前
Kyzentun | |
---|---|
Member | |
3,209 ポスト | |
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.
ポスト #5 · 2016-08-28 01:15:40amにポスト 7.7年前
leadbman | |
---|---|
Member | |
263 ポスト | |
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?
ポスト #6 · 2016-08-28 01:31:38amにポスト 7.7年前
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).
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).
ポスト #7 · 2016-08-28 02:52:20amにポスト 7.7年前
leadbman | |
---|---|
Member | |
263 ポスト | |
Reg. 2016-02-01 | |
"Working On: 5thMix BGA bgchanges" |
You guys are the BEST!!! I finally got it working properly
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!
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!