Re: [Bug] End application
Seems like a bug but I'm not sure.
A new event loop shouldn't be triggered if the 'end application' flag is set.
I guess since the event engine is based on a timer it will first be triggered after the first 1/50th of a second after the application is started so maybe CT put in a manual immediate event cycle trigger just after the 'start of frame' event was fired.
Seems like an easy fix to put in. I think extra actions for such things (very limited use) should be avoided.
Re: [Bug] End application
The problem is that at start of frame I start a very big loop (which is not a fastloop but it works similarly). But sometimes, I want to end the application instead of run this loop.
But the application is ended only after the loop...
Re: [Bug] End application
add a new condition, "run this event once only" and put end application, also try an "always" event
Re: [Bug] End application
"run this event once" or "always" are not events but conditions so they are executed after "start of frame"...
Re: [Bug] End application
well i remember the condition "every" if set to like 30ms it would do it for every 3ms if under 3 seconds for some reason, dont know if MMF2 fixed it
Re: [Bug] End application
No this is not a bug : I cannot end the application in the middle of the event evaluation! This is impossible, and if I managed to make it work, it would be very bad programming (pile POP everywhere).
So when you do an end application, it sets a flag, and this flag is tested at the end of the loop. This will never change, you just have to cope with it.Set internal flags on your own if you do not want certain actions to be executed after the end application.
Re: [Bug] End application
Or you could put the relevant events in a group and the "end application" event before the group, and if true it de-activates the group and ends the application.
A hacky way of ending the application instantly
* Start of Frame
+ Whatever condition
- Run loop "Close" 1 times
* On loop "Close"
- Run loop "Close" 1 times
Re: [Bug] End application
Thanks Francois for the explanation. ;)
That's a good idea Joshtek, I'll try it. :)
Re: [Bug] End application
Yes, I noticed that when you start the same loop in a loop it closes the application, I assume because this would start an infinite loop.
Re: [Bug] End application
Brandon, I think it's a crash without notification. ;)
It's not a very good thing to do that. :D
I have put all my events and group in another group "Program" and when I want to end the application instantly, I disable the group program and en the application. It works well. :)