I’m trying to do something in a blueprint, using a logic that works in any other language on Earth form ancient Greek to Ruby but that for some reason doesn’t work in blueprints. A simple loop guard. So what I do is the following:
- Create a global counter
- Every time the macro is executed the counter is increased by 1
- If the counter reaches a certain level, say 1,000, it prints a text (in my case it is “==== Failsafe loopguard ====”) and quits (as in, the printstring is directly connected to the quit game node)
Quite simple right? Then when I click ‘run’ the biomass hits the fan and this is what I find in the logs:
LogBlueprintUserMessages: [TestProto3x3_C_0] ==== Failsafe loopguard ====
LogBlueprintUserMessages: [TestProto3x3_C_0] ==== Failsafe loopguard ====
LogBlueprintUserMessages: [TestProto3x3_C_0] ==== Failsafe loopguard ====
LogBlueprintUserMessages: [TestProto3x3_C_0] ==== Failsafe loopguard ====
LogBlueprintUserMessages: [TestProto3x3_C_0] ==== Failsafe loopguard ====
LogBlueprintUserMessages: [TestProto3x3_C_0] ==== Failsafe loopguard ====
LogBlueprintUserMessages: [TestProto3x3_C_0] ==== Failsafe loopguard ====
LogBlueprintUserMessages: [TestProto3x3_C_0] ==== Failsafe loopguard ====
LogBlueprintUserMessages: [TestProto3x3_C_0] ==== Failsafe loopguard ====
LogBlueprintUserMessages: [TestProto3x3_C_0] ==== Failsafe loopguard ====
LogBlueprintUserMessages: [TestProto3x3_C_0] ==== Failsafe loopguard ====
LogBlueprintUserMessages: [TestProto3x3_C_0] ==== Failsafe loopguard ====
LogBlueprintUserMessages: [TestProto3x3_C_0] ==== Failsafe loopguard ====
LogBlueprintUserMessages: [TestProto3x3_C_0] ==== Failsafe loopguard ====
LogBlueprintUserMessages: [TestProto3x3_C_0] ==== Failsafe loopguard ====
LogBlueprintUserMessages: [TestProto3x3_C_0] ==== Failsafe loopguard ====
LogBlueprintUserMessages: [TestProto3x3_C_0] ==== Failsafe loopguard ====
LogBlueprintUserMessages: [TestProto3x3_C_0] ==== Failsafe loopguard ====
LogBlueprintUserMessages: [TestProto3x3_C_0] ==== Failsafe loopguard ====
LogBlueprintUserMessages: [TestProto3x3_C_0] ==== Failsafe loopguard ====
LogBlueprintUserMessages: [TestProto3x3_C_0] ==== Failsafe loopguard ====
LogBlueprintUserMessages: [TestProto3x3_C_0] ==== Failsafe loopguard ====
LogBlueprintUserMessages: [TestProto3x3_C_0] ==== Failsafe loopguard ====
thousands of times. So clearly it is fundamentally ignoring my quit node. What is very interesting though, which would also be funny if it wasn’t already past 10pm, is that when I just call the quit node directly through a key or something it actually quits the game. So there is a rat here somewhere and for the life of me I can’t figure out where it is.
Any illuminating insights would be incredibly appreciated. Also, other ways to implement this loopguard watchdog would be appreciated just as much.
Thanks all,
A