-
2 Attachment(s)
The way to trigger MMF2's "upon pressing key" bug.
I know how to trigger MMF2's bug that makes "upon pressing key" become "repeat while key is pressed".
Since KingToast said that "I've noticed that after some time," in his bug report, I started to realize that time was involved.
I've added an example file with this post.
When you press Space Bar, 1 will be added to the bottom counter. On "Always", 1 is added to the top counter. Wait until the top counter reaches 65536 (no surprise), aftr that, if you hold space, the bottom counter will increase like insane, as if the condition was "repeat while Space Bar is pressed".
In my latest post in that other thread I stated that the bug only happens on certain machines, but now I realize that I could be wrong about that.
-
Re: The way to trigger MMF2's "upon pressing key" bug.
I can confirm that this happens - it seems strange that it hasn't come up before, but it happens after 65536 frames have been drawn (just under 22 minutes at the default frame rate of 50).
-
Re: The way to trigger MMF2's "upon pressing key"
It happens to me a little after 33000.
-
Re: The way to trigger MMF2's "upon pressing key" bug.
It happens at 32769 for me.
-
Re: The way to trigger MMF2's "upon pressing key" bug.
Quote:
It happens at 32769 for me.
That's just about half of 65535.
-
Re: The way to trigger MMF2's "upon pressing key" bug.
It's 2 Pow 15+1, 65535 is 2 pow 16 -1.
-
Re: The way to trigger MMF2's "upon pressing key" bug.
i think it varies each time actually
-
Re: The way to trigger MMF2's "upon pressing key" bug.
It's always 32769 for me...
-
Re: The way to trigger MMF2's "upon pressing key" bug.
Ye, i can also confirm this bug: it starts like arround 33000.
-
Re: The way to trigger MMF2's "upon pressing key"
Confirmed, too. At 32,769. Why? It's the amount of loops that for some reason messes the condition up. Am I the only one that thinks this is serious?
If you add a "only one action when event loops" to the "upon pressing space key," the event won't trigger after 33,000.
-
Re: The way to trigger MMF2's "upon pressing key"
So that the condition is only valid one loop, I store the number of the loop in the condition and compare it at the next loop. If it is the same, then the condition remains false.
I did not expect anyone to continuously press a key during 10 minutes! Don't you think you are going too far here in your tests?
Anyway I'll have a look.
-
Re: The way to trigger MMF2's "upon pressing key"
Well, this should be corrected in the next build.
-
Re: The way to trigger MMF2's "upon pressing key"
Around 32000 for me here.
Looks like the 'upon pressing key' conditions breaks when too much time has passed regardless of how and when keys are pressed.
-
Re: The way to trigger MMF2's "upon pressing key"
Quote:
I did not expect anyone to continuously press a key during 10 minutes! Don't you think you are going too far here in your tests?
I think you misunderstood the problem - you don't need to continuously press anything. The bug will occur after the time limit even if you have not pressed Space Bar before the limit was reached (I remember it as after 65535 though). Basically all "upon pressing" events becomes "repeat while key is pressed" after 22 minutes, even if you do not continuously press anything before. I didn't even realize when I wrote my bug report that people would attempt to continuously press the button to trigger the bug, I guess I could have explained things a bit better :)
I'm in desperate need of a fix for this. I will soon release a new game, and the level editor uses a lot of "upon pressing" events, so things always gets messed up when people have edited their level for a while.
-
Re: The way to trigger MMF2's "upon pressing key"
At my work, the bug happen after 65536 (Build 244).
I confirm the bug (with or without pressing space bar before 65536 frames).
-
Re: The way to trigger MMF2's "upon pressing key"
It happens to me too on build 244 after 67000 frames, but not after 33000.
-
Re: The way to trigger MMF2's "upon pressing key"
And on build 245, it happens after about 32800 cycles. (Windows XP Tablet edition).
-
Re: The way to trigger MMF2's "upon pressing key"
As I said before, this will be corrected for the next build.
-
Re: The way to trigger MMF2's "upon pressing key"
Bug party ^^
Don't worry CT will fix it. Any new on when the next build would be arround?
-
Re: The way to trigger MMF2's "upon pressing key"
A good way around this bug, is to assign the buttons to the player's keyboard configuration thing, if you know what I mean... Well, for example "Player 2 moves Up", or "Player 3 presses Fire 1". They don't suffer from this bug.
-
Re: The way to trigger MMF2's "upon pressing key"
i use Control X object. Works great.
-
Re: The way to trigger MMF2's "upon pressing key" bug.
I can't re-code my game for that, that would take forever... I didn't even notice this before! I thought I had an engine bug :(
-
Re: The way to trigger MMF2's "upon pressing key" bug.
aww ;_;
im sure you can. try to replace one or 2 condition with that of the Control X, like the repeatwhile key is pressed, and the upponpressing key.
then drag these conditions down the code and drop them on the old MMF input/key conditions. MMF will then replace the old conditions with the new once of the Control X. This saves you a lot of times. Your done before dinner!
-
Re: The way to trigger MMF2's "upon pressing key"
WOW, this is really weird.
i thought it was gone in mmf2,
in TGF it happens far sooner really annoyed me.
it isn't hard to avoid tho.
-
Re: The way to trigger MMF2's "upon pressing key"
I did notice this too, for the only event I have that uses "upon pressing", which is for pausing.
Otherwise I always use "repeat while pressed" for action buttons where I add to a value and to check for one press I test if the value is 1.
It's another work-around I guess, but that's not why I use that method.
-
Re: The way to trigger MMF2's "upon pressing key"
There I did it! AND now I have customizable controls and joystick support... And all before dinner indeed XD
-
Re: The way to trigger MMF2's "upon pressing key"
Actually it's really dodgey... :S I'm going to have to change it back and wait for the fix in the next build :P
-
Re: The way to trigger MMF2's "upon pressing key"
Someone else has noticed this bug too then! I thought it was something specific to my game.
If I left my game running whilst I went and had dinner or something (to check I didn't have any object creation leaks or anything like that) then when I got back it would seem to work ok, except when I pressed the "toggle flashlight" button the flashlight would flicker on and off really fast.
-
Re: The way to trigger MMF2's "upon pressing key"
http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=51276#Post51276