if < logic not working correctly

Hey guys! I have this simple blueprint that checks if my CurrentEmitterIndex (defaults at 0) is less than 2, then ++ increments it, and if clicked the other direction, checks if above 0 then decrements. Cant seem to find where it is not working. It will change twice (seemingly) in the positive direction, but will not go back down.

ANy ideas?


Many thanks!

You don’t have “Current Emitter Index” plugged into the Input on the bottom CompareInt :stuck_out_tongue:

Thank you! That helped me, but for some reason it wont count down even when I add that.

Something else is wonky? Also, the controllers seem to emit the opposite commands…left seems to be right, and vice versa.

Any ideas? Here is my updated, it will count up properly, but no down:

No sorry, you need to plug the Current Emitter Index wire into the “Input” slot on the CompareInt, then just enter the number you want to compare with in the “Compare With” slot, in your case 0.

As it is hooked up currently, it’s trying to do the opposite, which will never result in a greater than value. :slight_smile:

If that still doesnt work, or if its still left is right and right is left, try swapping out the event plugged into the CompareInt to get the opposite effect

You rock! Sorry for such newb problems!

Any ideas on the reason why they broadcast the opposite controls? The trigger seems to work correctly tho, L vs R that is.

I have no idea why that is happening (don’t have VR so can’t test it sorry), but if you just want to reverse which side increases/decreases the number, you can unplug and swap both the MotionController events and plug them into the opposite CompareInts (move the top event down, the bottom event up and connect the wires back up).

If it is the controller itself that is acting strangely (outside of this blueprint), maybe check the connections? I’m not sure what the setup is, hopefully someone who knows can comment on that later. :slight_smile: