How to make it only output once with multiple triggers


so im trying to make a better run & jump, whenever i press W i cast these raycasts, and when im on solid ground it will output all three, which gets the jump *3, so it jumps way too high. how do I make only one output but all of them still work?

1 Like

oh wait, can I do this with an OR gate?

will this hacked in gate work or will it disappear when i reload…
image


this doesn’t work either for some reason, still jumping too high
(the gate is set to OR)

The heck did you make that

Nevermind any way ive done this before there is no way to acomplish it

Try using volocity instead of inpulse

messing with import code

Explanation

so this is the import code for a logic gate right? see that inputCount thing (highlighted)

{“data”:{“behavior”:{“v”:“2”,“nodes”:[{“inputCount”:2,“outputCount”:1,“name”:“Logic Gate”,“behaviorType”:“logic.logic.Gate”,“x”:180,“y”:576,“group”:“c84279995ed5ae41”,“id”:“cee4c4dc461d054b”,“gateType”:“OR”}],“links”:[]}}}

it defaults to 2 inputs, but i set it to 3 to give the block 3 inputs.

1 Like

Does it work ?????

not sure

funny block

image

Stop oh please its curesed

1 Like

using velocity works, thanks

Oh ok i guess tats what solved my problem when i did it, ive messed around with raycast jumping for my game as well, been a while thouh

1 Like

first off, you have some issues with your code.
this works okay but you should turn a switch on and off so you don’t have to reconnect everything to the raycasts every time. Then using an impulse shouldn’t be an issue.

2 Likes

Impulse is bad anyway

1 Like

Not at all, impulse is much better for physics simulations, and it’s usually what I use whenever I’m focusing on realism. Velocity is more precise, however.

2 Likes

I find volocity a lot less buggy

1 Like