Please implement Short-Circuit evaluation for Blueprint

Wait this still isn’t fixed? I got hit with some terrible virus, so when I get the I will make a pull request, someone else can do it if they want. I’m fairly certain the fix is on the first page. iirc the comma operator and return line fixed the sc for the and node. If other nodes do the same thing the should also probably be updated. the assumption is if SC is what is intended, its a bug if no SC.

the file is UnrealEngine/Engine/Source/Runtime/Engine/Classes/Kismet/KismetMathLibrary.inl

also don’t just submit a pr, dl the master, edit code and test it.

Edit after some extensive testing im fairly sure blueprint verifies all input to a node before it executes. i will try some other things. although it seems a node like && cannot short circuit because it’s by blueprints design. i originally thought the compiler was doing something but i think its actually bp, which makes much more sense anyhow.

//test1 normal engine

// test2 my edit of the bp nodes

nothing changed. looking back, this is totally expected. it has to be execution order. basically, AND(A(), B())… A and B are executed before AND().

i don’t think this is possible actually because it acts like a function and must be fully evaluated. this was an interesting little test.
soit is possible with my original idea, the staggered nodes which isn’t ideal but at least we have something. I guess if you really need the speed code in cpp, hehe