New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Event Manager - Miss, Bad Cut, Multiplier Down, Left Slice/Collision, Right Slice/Collision #144
Comments
These are very good points and suggestions!
I'm not sure exactly what you mean here. Should these events pass the number of consecutively missed notes?
Would it make sense to instead have an OnMultiplierChanged similar to the OnComboChanged event that passes the current multiplier?
Makes sense. I'll add this.
I know the OnLevelStart event can be troublesome – I believe it might be triggered too early for certain things like animator parameters to work properly. I'll make sure to look into this. |
Oh! I hadn't realized you replied! Glad I decided to check in.
So for On Miss and On Bad Cut, it would just trigger once for each note missed or bad cut, as opposed to combo break which only triggers when you break a combo of at least 1. Missing/badcutting on 0 combo does not trigger this event again.
Is there an On Combo Changed? I don't recall seeing that in the events. - On Multiplier Changed would technically work, but it would require a tandem with hit or miss events in order to determine if the multiplier went up or down. Since OnMultiplierUp already exists, I figure it would be easiest to just add a counterpart for Down.
I see! Much appreciated. I should perhaps also mention that OnMenuEnter has the unexpected behavior of only triggering when transitioning between menu environments, such as going from song select to the Counters+ config space, rather than when leaving a map. |
Oh okay, that makes sense.
It's definitely possible to distinguish the two so I'll add those as separate events.
Looks like it's broken right now. My bad! That'll be fixed.
I see. I'll just add the "down" event then.
Thanks for letting me know! No need to create a new issue, I'll just add it to my list of things to do. |
Alright, I think I've added/fixed everything we talked about here:
Also a few other things that were changed:
It's all available as of this build if you'd like to give it a try. On a somewhat related note, do you think it'd be useful to have the combo and multiplier numbers be set as animator parameters? I haven't played around with animators a whole lot yet but I'm assuming this would be better than relying solely on triggers. |
You're awesome! Thank you so much for your time and patience with all this. I'll absolutely give it a try, and perhaps even leave a link to a clip of some kind if I can get what I had in mind going well! (It'll probably be a Twitch clip.) And, actually yeah, that could be pretty useful. Multiplier is pretty easy to keep track of with up/down events since there's only 4 tiers, but combo being able to go into the hundreds or even thousands makes it somewhat impractical to track manually. Though I do use 'Combo Reached Event' as a means to track which multiplier tier I'm at, as of my existing avatar iteration, which won't be necessary with these additions. Edit: Regarding the returning from multiplayer environment, that could be good, given but not totally necessary, as it would be possible to simply have a parameter toggled on by 'enter multiplayer lobby', which could just as simply be checked upon triggering 'menu entered'. That's how my multiplier changed tracking functions, checking for a specific combo target parameter in conjunction with a multiplier up event parameter. |
As of checking the new version in Unity, it seems there's a couple issues.
I'll edit this post once I've had a chance to incorporate the new event structure to my avatar and test it. So far I have not encountered any issues that'll prevent me from refining my existing animator layout, and adding the new left/right saber stuff. |
Yeah, it turns out the "combo changed" event was only getting triggered when the combo increased so I just renamed it for clarity's sake. As you said, it and the broken event can be used together to figure out when the combo changes and I'd rather not have redundant events to reduce clutter so I'll leave it like that.
Oh sorry about that, it looks like I accidentally removed them from the editor DLL. They're back as of this build.
Yeah that's normal – those events pass the combo/multiplier as that Int32 parameter. The combo one is necessary for the event filter behaviours to work. The multiplier ones aren't used yet but they might be useful in the future. |
Ahh, makes sense. Right-o, that one's squared away then.
Glad I noticed! I am however going to hold off on picking up that build, as, as implied, I'm not in need of those scripts anymore, but also it seems there are further issues that may necessitate tweaking. [Detailed later in this response.]
Ah! Fair enough. Luckily setting functions is a one-and-done thing, so it's no big deal. Testing completed! Menu entered and map entered events now indeed work! So far the left/right hit differentiation also works perfectly, but only for good hits. Bad hits and misses are instead triggering the Menu Entered event it seems. EDIT: Pardon, this may be an issue on my end actually. Animations and animators are, not as intuitive in Unity as they really should be. EDIT 2: I cannot seem to determine why good hits are working but bad/misses aren't, on my end. I had one hand working for a while and now it's not and I can't figure out how to get it working again. I even tried severing the connection to the state containing the hide animation and it still is having issues. I'm at a loss and I've run out my patience for the night. |
Alright, I'm glad I'm not the only one who finds them confusing 😅 I'm pretty sure the bad cut/missed note events are working properly (I spent a while making sure left/right worked properly with the left handed setting) but I'll double-check on my end just in case. |
Further testing seems to say that it was something to do with having Write Defaults enabled on the various animator states. I thought I had taken sufficient measures that such a thing shouldn't be a problem, but never the less, it seems disabling that on all animator states has solved the issue for now. As far as I can tell, write defaults was taking whatever the first state activated and resetting to those values any time Bad/MIssed events were triggered, but not good cut. Which doesn't make much sense if ALL of the states were set to write default, meaning the last state active should have been what was applied, but it wasn't. Update: Further testing has indeed confirmed that it was just 'Write Defaults' being enabled on Animator states preventing things from working correctly. Through various bits of tinkering with the animations themselves, I have a working system! My avatar elements now flash brighter on a hit on the relevant hand, red on a bad cut and grey on a miss. It would be a bit too much hastle to get a proper video, so instead here's a little clip of some desktop mode misses: https://i.gyazo.com/944ac26906c644b99678a5fd02f41a0b.gif |
In case this post is still considered up in the air; beyond the usual Unity related animation shenanigans, the new additions and changes do seem to work perfectly! I have discovered another potential bug though! |
Okay good to know, thank you for trying it out! I don't think Related to above, I do want to figure out a way to manually trigger animator stuff using your controller and make it an official part of the mod. Ideally it'd be similar to the action menu in VRChat but I haven't really looked into how that would work yet. Depending on how much effort is involved I might add something similar to CustomKeyEvents as a stop-gap solution. |
Oh! I didn't even realize. I guess I grabbed it so long ago that it slipped my mind that it was from somewhere other than this mod. I shall try and see if it's just a version issue. Edit: Turns out I didn't realize that it had its own plugin to insert rather than just a Unity component. It works now. :)
That would awesome! I do prefer the idea of being able to just press a button to directly activate an expression, but an actual menu would be great for more elaborate things like color or outfit changes. In relevance, I hope that you're still considering figuring out lipsync too! That's a huge part of avatar expression after all. It could be as simple as sending the volume value of the mic feed and letting people figure out how to apply that to an animator, until you figure something more complete that can recognize syllables and whatnot. However that has its own Issue Post, so unless you would like to use this one as a means to track button event progress, perhaps we should call this one closed? And with all that said, I want to express that I highly appreciate all the effort you've put into all this. As someone who has done a measure of coding in the past I understand how difficult and often frustrating it can be. I would offer monetary support if I could. |
Glad you got it working!
I see. I'm mostly worried about eventually running out of buttons to use. I'll have to think about it.
Yep, that's definitely still on my to-do list. Great suggestion - it's definitely a decent first step.
Yeah, I think we're done here. I'll keep the key events & animator parameter things in mind. They definitely won't make it into the next update since there's a small bug that needs to be fixed for 1.28.0. There's also some relatively urgent tracking/calibration-related things that have been on my to-to list for over a year that I really need to fix before doing basically anything else so I unfortunately can't give you a timeline on this, but hopefully sooner rather than later!
Thank you so much for your kind words! Don't worry about it – I'm always happy to help, especially when you're willing to spend some time helping me figure it all out 🙂 |
[Problem]
[How it is a Solution]
[Additional Context]
On Level Start does not seem to activate animator trigger parameters, requiring the workaround that led me to start trying to track multiplier for creative purposes, and to find this made difficult by the lack of these requested events.
The text was updated successfully, but these errors were encountered: