You were right, I actually figured out how to do this! I was always avoiding statemachine, it looked too sophisticatedYou can use a StateMachine in Advanced-Mode, using the MultipleChoice triggers.
You were right, I actually figured out how to do this! I was always avoiding statemachine, it looked too sophisticatedYou can use a StateMachine in Advanced-Mode, using the MultipleChoice triggers.
Version 14 is now free!
private float value;
private void Update()
{
if (enabled) myFloatTrigger.Update();
}
public void OnEnable()
{
myFloatTrigger.Trigger(value);
}
private void Trigger(float v)
{
value = Mathf.Lerp(myRangeMin.val, myRangeMax.val, v);
if (enabled) myFloatTrigger.Trigger(value);
}
Sadly, that checkbox does not exist in every Logicbrick. (e.g. ValueRelay)There's a AcceptTrigger checkbox in each Logicbrick, that's what you should use @8n2ybclyk982
Note that you can copy&paste text when in Desktop mode. So, usually you wouldn't "type by hand", which reduces chances for typos at least.When we are configuring a trigger to call the function that select a choice, we have to write by hand the exact name of the choice.
Yes, it would. Actually the new SoundFromAB brick uses something like this.I think it would be better if we can select the choice from a list.
As you noticed yourself, that's a Timeline thing, but not nessarily ans "issue". It behaves as a coder would expectI setup an Audio timeline trigger to PlaySpecific from AB
Would have to try (no VaM access from here), but I think right now it remembers the last folder location you used with that particular dialog window. Simply because I'm not setting a folder at all? So the next time you use the plugin in your VaM session you would be in the correct folder already (whatever that may be). That should even work across plugin instances in a scene? If I set a default folder, that wouldn't work anymore? So the current behavior seems more suited for power-users like @Slam Thunderhide who have thousands of audio files in their scene.Minor comment, but it is possible to change the default location to Custom\Assets for selecting the audio assetbundle?
As you noticed yourself, that's a Timeline thing, but not nessarily ans "issue". It behaves as a coder would expect
The trigger triggers when a particular time is reached. If you set that to 0.0, then it obviously triggers when the animation time reaches 0.0. Resetting timeline is likely pretty much the same as just setting the time to 0.0....so it correctly triggers
Probably try setting your trigger time to 0.05 or something like that.
Would have to try (no VaM access from here), but I think right now it remembers the last folder location you used with that particular dialog window. Simply because I'm not setting a folder at all? So the next time you use the plugin in your VaM session you would be in the correct folder already (whatever that may be). That should even work across plugin instances in a scene? If I set a default folder, that wouldn't work anymore? So the current behavior seems more suited for power-users like @Slam Thunderhide who have thousands of audio files in their scene.
If you don't need multiple delays simultaneously (as in no other delay is triggered before the current one finishes) you could (ab-)use the state machine for that.Hi. I use some of your logic bricks all the time. Delay and State machine are two of my favs. I did notice a potential bug with State machine. When you use the "reset pose" button on the "Control & Physics 1" tab, all your states get deleted on any state machine plugin used on the figure.
Also, second question. Is the Delay plugin the only one that has the ability to set a delay? Is there one that you can set up various potential triggerable actions but where they all fall under the same plugin? I currently use a bunch.
Ah...good idea.If you don't need multiple delays simultaneously (as in no other delay is triggered before the current one finishes) you could (ab-)use the state machine for that.
- create a default "off" state
- create all your "triggerable actions" as states with the delay as duration and set their default transition to the off state.
- put your actions into the OnExit triggers
@Slam Thunderhide reported something similar a few days ago. Found the issue by now, general undocumented weirdness of VaM. It affects likely almost ALL of my plugins. Some of them will loose data partially, which may be even worse than losing everything.I did notice a potential bug with State machine. When you use the "reset pose" button on the "Control & Physics 1" tab, all your states get deleted on any state machine plugin used on the figure.
Besides abusing a StateMachine, you could also use a Delay that triggers a SelectChoice. Benefit over the StateMachine is that you could change the duration of the Delay by trigger, if you need that.Also, second question. Is the Delay plugin the only one that has the ability to set a delay? Is there one that you can set up various potential triggerable actions but where they all fall under the same plugin? I currently use a bunch.
Thanks. Yeah, I don't usually use the legacy poses, but occasionally do for a reset. I'll create a new preset for that, as you mentioned. As for your suggestion regarding SelectChoice...how does the delay know which choice I want it to trigger? I'm assuming I would trigger the delay...which in turn then triggers the select choice, correct?@Slam Thunderhide reported something similar a few days ago. Found the issue by now, general undocumented weirdness of VaM. It affects likely almost ALL of my plugins. Some of them will loose data partially, which may be even worse than losing everything.
Strong recommendations:
- DO NOT USE LEGACY PRESETS! That includes "Reset Pose" and "Reset Look" buttons. Create yourself a new Pose preset with a T-Pose, if you need it. With those there shouldn't be trouble.
- Save your scene regularly. Every few minutes, if you need to. It never hurts to have a backup
Besides abusing a StateMachine, you could also use a Delay that triggers a SelectChoice. Benefit over the StateMachine is that you could change the duration of the Delay by trigger, if you need that.
You would trigger it by setting which choice to use on the SelectChoice, then triggering the delay. The Delay would then trigger SelectChoice, which then does what you set it to do earlier.Thanks. Yeah, I don't usually use the legacy poses, but occasionally do for a reset. I'll create a new preset for that, as you mentioned. As for your suggestion regarding SelectChoice...how does the delay know which choice I want it to trigger? I'm assuming I would trigger the delay...which in turn then triggers the select choice, correct?
That sounds incredible wasteful in terms of CPU resources...in a game where CPU is everything.He uses animations combined with collision triggers.
It does have some overhead but it's not noticeable because the physics engine isn't involved.That sounds incredible wasteful in terms of CPU resources...in a game where CPU is everything.
Without more details I can only guess. LogicBricks in general usually works with triggers. So, you need a trigger connection from your "dedicated atom" to the Delay brick. Then, from its "Actions OnTrigger" slot, have the Delay brick trigger AudioMate.I feel like this should be easy, but I'm trying to add a small delay in between calls to Audiomate plugin on an Atom. I have tried the Random Delay and Delay bricks by installing those plugins both on the same atom and by calling them from a dedicated atom with just the delay plugin, but no luck. Any quick pointers?
Thank you very much! The fact that you made an example scene is truly above and beyond! These are both great in their own ways but I believe I will use the StateMachine, you've explained it very well and it'd be good for me to experiment with it, it does seem like a very powerful plugin. I've been a bit intimidated by some of your LogicBricks plugins to be honest, but from what I've seen and tried myself, taking the time to experiment with them and learn what they can do (I see you have some very nice video tutorials, those will help a lot) seems like it would definitely be worth the effort. Thanks again!There are two ways, depends what you need exactly:
Made you a quick example scene containing both, uses LogicBricks.14
- Using two buttons. Just have one button turn itself off and then turn on the other. So you swap between the buttons.
- Use a StateMachine with two states to cycle through. Each states just waits for the "TriggerSync" signal which it gets from the button, then transitions to the other state. Because we can....I also made it utilize the duration of states for nicely fading the sphere in/out. This can also handle button mashing, since the State does not transition before the duration is run out, so a button click too quickly after another is just ignored as it is common practice for such things.