Get pause state of matinee node in kismet - unreal-development-kit

I have set up an elevator in the UDK so that if a generator goes offline, it will pause the elevator. Everything works fine, but when the generator comes back online, you have to touch the trigger volume for the elevator to get it to resume its animation. For instance, someone is riding the elevator and the generator goes down, the elevator pauses. Great. When the generator comes back online, I don't have a way to resume the paused matinee.
I would need a set up in kismet that would see, if the generator is online, and the elevator matinee node is paused, then play the animation.
So, my question is, is there a way to check in kismet if a matinee node is in a pause state?
Thanks.

You can make a Kismet boolean variable bPaused. When you need to pause the Matinee, first set bPaused to true with a SetVariable action, then pause the Matinee. Check the bPaused variable with the rest of your Kismet when you need to know whether the Matinee is paused.
Make sure to reset bPaused to false when resuming the animation.

Related

Is there a wait function in GML?

I've been trying to make my code work for some time, but I can't seem to find a way to make it work, specifically, I can't find a way to make an object wait in an if statement or find a viable alternative to one.
Essentially, I've been trying to make a game object move to the right for 2 seconds, and then go back to it's original coordinates once that movement is finished.
I'm pretty new to GML, but I figured something such as x += 2 was what i was searching for in terms of moving the object to the right. However, I can't find a way to make said object execute x +=2 only once once pressing the control button (because it keeps sliding to the right as long as I press it, it doesn't just make a swift movement to the right), then wait in place for 2 seconds. I've tried making if statements as intricate as I could make them, but to no avail.
If anyone has any idea, i'm excitedly open to it.
Have a good day.
You are probably looking for a timer, to let the object wait before an action. In that case, this question may help: Delay time in GMS2
I would not recommend your current approach (using a while loop to wait until the timer is finished), as that will put all the code and actions in the object event on hold until that while function is done.
You should also look up the difference between a button 'press', and a button 'pressed'.
When it's press, it'll do the action as long as the button is hold.
when it's pressed, it'll only do the action once when the button is pressed and released.
I found a way to swiftly do it by creating a timer thanks to a while statement, yes they exist; even though it's not written in the game maker manual, which is a relief but also a pain to deduce how it works in there sometimes.
while (timer > 0 && timer < numberofframesyouwanttheactiontogoonfor)
{
timer++
break;
}

Is there a way to rescue my processor from a reset deadlock

I have a board with an XMC1400 MCU on it. It is a custom board with LEDs and buttons and so on.
So I accidentally add a '''XMC_SCU_RESET_AssertMasterReset()''' line at the beginning of the code... This function cause xmc to reset but it doesn't just reset the program counter, it also clears everything and ends the debug connection. And since it happens so quickly I cannot reconnect before it resets again. For the one who doesn't know, when you load a program to the xmc, it gets written to the flash, and once it's loaded it will always run with power up.
I know in some boards there are some pins used to clear to board when shorted but there is no such a thing in this one.
There are however several bootstrap loaders(can and uart). But they are disabled by a flash parameter called BMI. I don't have much hope but is there a way to rescue this processor?
Thanks!

State duplication in FSM

I'm trying to implement a FSM which handles a button in the following way:
When in Standby mode, it just waits for button to get pressed.
When it is pressed, it moves to intButtonPress state, where a 2 second timer is started. If it times out, it means that the button was held for 2 seconds and the next state must be Action. If the button is released before timeout, state returns to Standby as the button wasn't held long enough.
When in Action mode, some action is performed, but it can be interrupted by the button press. Problem is that i can't reuse intButtonPress state since it's timeout transition would lead back to Action state, so an obvious solution is to use an identical state whose only difference is that it leads to Standby state, but it's ugly.
Are there better ways to handle this?
FSM is here: http://i.imgur.com/m57yaMw.png (can't embed pictures)
Answering my own question - use hierarchical state machines: http://i.imgur.com/DzBApeY.png
Super-Standby state is not strictly needed.

Netstream bufferlength is zero when pausing. How to prevent that?

I am using Flex 3 and FMS3 from where I and sending a videostream. I want the user to be able to pause the stream, then resume it.
For this I am using the methods pause() and resume(). The problem is, when I call pause() the bufferLength is released and equals zero. Accordingly when I resume, the NetStream needs to start buffering all over again, which means I loose all video from the second I paused untill I press resume. And the intention of pause and resume seems of significance.
Any help?
Please see my other question for this.
Create server-side DVR application to be able to record DVR in FMS
If possible, please close this one.
Regards Niclas

VXML Beep at recording timeout

The VXML application I mentioned in a previous question is now in testing. After allowing the user to record a message (max length 5 minutes) we go into a standard menu (submit, playback, re-record, etc).
One of our testers, bored as anything and tired of leaving a 5-minute message was reading an email we had sent, including the phone number. She said 'Two' just after the menu started, having heard only a split second of the menu.
Needless to say, she was very confused.
The right way to fix this, to me, seems to be to add a definitive stop to the recording, like the beep that begins it.
The record item has a beep property that beeps at the start of the recording, which we use. I can't find reference to any property that would beep when the user reaches max time.
How can I add an uninterruptible beep at the end of a when it has reached the maxtime?
Well, a bit more digging tells me that there's no property for it on the object.
But I did turn up a property on the resulting variable 'maxtime' that tells you if it ended due to a maximum time exceeded event.
By checking that in the section, but before sending them to the menu, I am able to use an block to play an audio file with bargein="false"
It's a bit more code than I'd like, but it seems to work.

Resources