Re: Press fire button Glitch? Design?
Quote:
Originally Posted by LB
Player 1 presses fire button: Set value to 1
Value is 1 & Player is on ground & Only one action when event loops: Set value to 0, shoot bullet.
I thought this would work, as I've used a similar work around in the past, but it actually creates even more problems. One of them is if I'm holding the shoot button, then retrieve the item that allows my player to shoot, he shoots on impact; FURTHER demonstrating this Press Fire bug, as it is *acting* like "repeat while fire button is pressed", yet only shoots one bullet. Besides that, the issue remains regardless of variables acting as a limiter of sorts.
Quote:
Originally Posted by N64Mario
Yea, I see what you mean.
I have tried everything ppl suggested on this thread, and this fire button glitch STILL happens.
I guess what's happening is, since the control is ignored, every control/button you press/hold down wont do anything.
So when the control is restored, the events then recognize the condition. So it assumes you have just pressed fire button instead of actually pressing it, not holding it down. X_X
Kind of hard to explain, though maybe one of the clickteam admins can take a look into it, and see if they can correct this misatke?
Other than that, the best method, or work around for this is to use a 'fake' ignore control function. In other words, always have control functions on, but disable/enable groups that have events with user control conditions.
This seems to be the only option, but I simply don't have one group where all my player input resides. My input events are "snuck into" the groups in which the actions call for them.(Sorry, I don't know how else to word that lol.) So yeah, I am relying on MMF2's control options to work properly.
..Blah, I can't sit here quoting everyone XD; So. No, using only one action per loop is not the solution seeing as Press Fire button is an immediate condition. Variant, I appreciate the example but it is void of the events related to this issue. Likewise for dsilver; these are simple shooting techniques unrelated to the problem at hand.
This will remain a bug in my book; That is, without the aid of 10+ completely unnecessary events ;P
Re: Press fire button Glitch? Design?
for starters just whoa back.
are you using the joystick for presses fire?
cause there is repeat and there is just press.
do you meant repeat while user presses fire1?
Re: Press fire button Glitch? Design?
Here is an example showing the issue.
View MFA
If you hold shift (fire button 1),tap Q (ignore control), then tap W (restore control) The object illogically shoots a bullet, as if MMF was reading this:
+Upon control restoration
+User is holding Fire button 1
+Only one action when event loops
-Shoot bullet
Where as, unless I'm just on a different planet, the object should only shoot a bullet precisely on the downstroke of Fire button 1.
I guess that's just how the events work, which is why I threw "Design?" in the title. Though, in my opinion it is clearly a bug.
Re: Press fire button Glitch? Design?
explain what sort of result you want.
ie:
user holds fire, and it repeatedly fires,
or
user holds fire, and it fires only once.
or
user presses & releases fire, and it fires once per press
for what you're trying to do shouldnt be an issue.
Re: Press fire button Glitch? Design?
It sounds like he is expecting (as he should) for a single shot to be fired when he presses the fire button down. And if he keeps holding the fire button down forever, even if the condition/action to shoot are in a group that is disabled/enabled while he is holding the button, the condition should not shoot again. But for some reason it is. Basically, the press down condition should only EVER return true once until it is released and pressed again. (yipes, did that makes sense?)
In regards to your problem, you might try setting a flag to ON when you press the button like this:
+User presses fire
+Flag 0 is OFF
-Shoot bullet
-Set Flag 0 to ON
+(Negate)User presses fire
-Set Flag 0 to OFF
That way, the flag acts as a check to see if the user released the fire button.
Re: Press fire button Glitch? Design?
;_; Thanks Mobi, these are in fact the results I am trying to achieve. However:
Player control is ignored = User is not pressing Fire = Flag is turned off = Issue remains.
I might be able to add a few more events to solve it, I was just hoping this could be fixed in at most a handful of events.
Now, forgive me if I'm out of line but does the great Clickteam even look into these sorts of things? If you scan through the forums you will see all kinds of innovative ideas and bug fixes and the like, which, even though I'm not so familiar with scripting languages, don't seem like much of a task to do something about. But instead there are other things being worked on which, imo, shouldn't even have had their development considered without completely tackling every single nook and cranny with the previous software first. Instead a workaround is given and the problem at hand is entirely forgotten about. I get the feeling I will (If I'm still using MMF that is) encounter this "bug" again 10 years from now.
Re: Press fire button Glitch? Design?
You guys all seem to be misunderstanding his problem (as did I at first).
What's happening (*I think!*) is that if Player 1 control is ignored, and he's holding the fire button, then Player 1 control is re-enabled, while still holding the button, it shoots _once_ upon re-enabling.
I'd say this is most likely by design, but a bad design choice. The best workaround is, as you said earlier, to disable a control group rather than outright ignore control.
Re: Press fire button Glitch? Design?
It sounded like he wanted the "press a key" action to only yield true if BOTH the pressing of a key AND the code listening for that key is enabled. Currently MMF will make the key press code return true if the key is being pressed (still held down) when the group with the key press code is enabled.
Re: Press fire button Glitch? Design?
really - i dont see what the fuss is about!
you dont need to ignore control etc at all.
there IS NO BUG in what it does.
if you want to press and hold button, and it will shoot only 1 bullet until you let go and re-press, then do:
joystick - read joystick state - deselect directions, tick fire1
DONE!
looking at the event, it will say [player1-joystick icon] pressed fire 1 - shoot bullet at speed 100
* DO NOT PICK REPEAT WHILE JOYSTICK PRESSED
which will cause exactly the issue you are having - which by the way can be solved VERY simply a different way.
the key word = PRESS[ ED ] this is past tense for the uneducated
and dont say that doesnt work - cause it does exactly how you claim you want it to.
Quote:
It sounds like he is expecting (as he should) for a single shot to be fired when he presses the fire button down. And if he keeps holding the fire button down forever, even if the condition/action to shoot are in a group that is disabled/enabled while he is holding the button, the condition should not shoot again. But for some reason it is. Basically, the press down condition should only EVER return true once until it is released and pressed again. (yipes, did that makes sense?)
Quote:
;_; Thanks Mobi, these are in fact the results I am trying to achieve.
if i sound irritated, its because i am. you are the sort of person who claim clickteam have got it all wrong for years because you simply have no idea of what you're doing.
Re: Press fire button Glitch? Design?
danjo you obviously have no clue what this topic is about, and honestly I find your last response VERY offensive. Please re-read the first post or check out the example I uploaded to see the issue. I know 50+ different ways to have an object shoot a bullet; this is not what I was asking about. Way to make an ass of yourself. Think I don't know what I'm doing? Here's a video of a Metroid project I created last year: http://www.youtube.com/watch?v=QHBwosCIoTc
Oh and I appreciate the smartass simpleton remark in the .mfa, obviously it is you to have not understood such a simple question. Though, not as much a simpleton as an arrogant @#$(