Clickteam Fusion 2.5

Clickteam Fusion 2.5

How do I detect the changing in alterable value as a condition?
I only want the event when "the alterable value turn into 1 from 0." But how?
Is there anyway I can compare the value to the one from last frame?
Originally posted by Lucasion:
Well you can try to store the previous value of it before changing it, and testing for
"If previous value = 0"
and "Current value = 1"
Do blablabla

I hope you understood that. I'm terrible at explaining
< >
Showing 1-6 of 6 comments
Ghoulsly Aug 5, 2018 @ 1:50pm 
Just compare derectly against the value itself?

Alterable value = 1, do one thing
Alterable valye = 0, do another.

Or, on the same event you're using to change the alterable value from 1 to 0, copy that same event and instead of changing the value, add an additional check to whatever other condition/s you already have in place, so that it also checks to see if alt value = 1.

This way, say your set up lets you have your alterable value at 2, and you can set it to 0. Well with the additional check that if alterable value = 1, the event won't actually fire in any other circumstance.
Last edited by Ghoulsly; Aug 5, 2018 @ 1:51pm
Originally posted by Shiggity Whomp:
Just compare derectly against the value itself?

Alterable value = 1, do one thing
Alterable valye = 0, do another.

Or, on the same event you're using to change the alterable value from 1 to 0, copy that same event and instead of changing the value, add an additional check to whatever other condition/s you already have in place, so that it also checks to see if alt value = 1.

This way, say your set up lets you have your alterable value at 2, and you can set it to 0. Well with the additional check that if alterable value = 1, the event won't actually fire in any other circumstance.
Thank you for replying, but I've tried and it doesn't work since I got the value from someone else.

I bought VACCiNE 2 as my input system, and it works like "if Z on keyboard/A on xbox gamepad/Circle on PS4 controller is pushed, set the alterable value "JumpPressed" to 1."

It must check if the buttom is pressed every frame, so even I change the value after I got the event it still got instant refreshed.

I want to press the buttom to toggle a flag, and I don't want it to do that 60 times a second.

Maybe VACCiNE 2 has the solution itself, but I often find it inconvenient when I can't just detect variation per frame especially when it's related to physics.

So... do I have to wish for that in CTF 3?
kisguri  [developer] Aug 6, 2018 @ 2:58pm 
Is Vaccine 2 using global values or local stored values in a object within the frame.
Originally posted by kisguri:
Is Vaccine 2 using global values or local stored values in a object within the frame.
It's a value stored in an object called "VACinput", and it has values like "moveLeft" "moveRight" " inputJump", 1 for pressed and 0 for realeased.
It has no Global value in its mfa file.

The only way I can think of for now is to get the condition "Is the value CHANGED to 1 this frame?" so it goes like "upon pressing a buttom" instead of "repeat while a buttom is pressed."

If I can't figure out how to get the control done, I would have to redo the level desigh I guess.
The author of this thread has indicated that this post answers the original topic.
Lucasion Aug 7, 2018 @ 11:54am 
Well you can try to store the previous value of it before changing it, and testing for
"If previous value = 0"
and "Current value = 1"
Do blablabla

I hope you understood that. I'm terrible at explaining
Originally posted by Lucasion't:
Well you can try to store the previous value of it before changing it, and testing for
"If previous value = 0"
and "Current value = 1"
Do blablabla

I hope you understood that. I'm terrible at explaining

♥♥♥♥♥♥♥♥♥
IT WORKED

So, I just figured out how to detect the changing in alterable value, let me try to explain how I did it.

How to know the value from last frame and use it in calculation?

Just creat another value and have a always event "set value* to value" and put this after the
target event but before the events that changes the value. This order matters A LOT.

In my case, I created a "buttomPressed*" and "awlays set it to buttomPressed", and my target event condition- which is what I'm asking in this post- is "buttomPressed=1" AND "buttonPressed*=0". (Note: It's better to set "bP>bP*" but you get the idea.)

So this would only occur for a frame, because later in the same frame "always set buttomPressed* to buttomPressed" would be triggered and they would both be 1.

And since that is a way we can get the value from last frame, with "value - value*" I can finally get the acceleration with the speed value.

It's kind of stupid that I have to set a new value everytime I want to have the variation in a value, but right now I just fell so great that I don't have to learn GMS. Yet.
< >
Showing 1-6 of 6 comments
Per page: 1530 50

Date Posted: Aug 5, 2018 @ 1:38pm
Posts: 6