Conditional Branches and Variables, only "==" operation condition works and only if value is "0"

Greetings, I'm trying to make a system where the TP is replaced with a fear gauge that displays certain dialogue in battle depending on the amount of tp the player actor has, the end goal of this system is to have it so that when tp(fear gauge) reaches 100 the enemies get different images (transform into different enemies altogether) as well as tint the screen and change the bgm. I managed the actual switching and the bgm changing working, but I ran into a problem with the triggering the actual event. im using a common event and have stored actor 1's tp as a variable, but when i use the variable in a conditional branch it only works if I use "==" or set the variable value to itself which is 0, Im pretty sure im doing things completely wrong but I dont even know how to begin to get things right.
1741513857784.png

1741514169059.png

thanks so much for reading all my rambling, im new to RPG maker MV and am loving it so far, I appreciate any help I can get!
I'm not entirely sure but I think you messed up your script

it should be
.Tp

.tp is undefined in that case
it should be
.Tp

.tp is undefined in that case
the opposite. "tp" is the name used for it and "Tp" would be undefined.
its only Tp in function names like gainTp per camel case naming convention

@Hugooo
your troop event's span is set to battle. that means itll only ever run once in a fight. even though you set the condition to be every turn, the span will restrict it to the first time the condition is true (i.e. only the first turn before you would have been able to gain any tp). change it to "turn" so that it runs every turn
the condtion you set is as follows

20, 60, 80, 100 (this should check in a reversed settings.)

if fear >= 100
to scared to continue
else
if fear >= 60
>= 20
etc

than it works as it should, as => 20 is always fired first, so the else would
be false as long as the first condition is true.

Edit:
here is a small sample to make it work (if you put battle to "turn" like Robro said.)
when you have your common event like this, it should work after wards.
sample.png
Also, you want to use else cases for your conditions.

In your current event, if you have 100 Fear, the event will step through every level you defined, so all 4 text messages will show. I assume, you only want one at a time.

If you don't use else cases and mondify it the other way around (like correctly suggested above), nothing would happen at all, before reaching 100 Fear, which would be incorrect aswell.
I managed to get it working the way I intended thanks to you guys, I cant describe how happy I am now that its finally working. I've been bashing my head on a wall for a couple days trying to figure this out lol. also I'm completely new here so how do I ask to close the thread?
how do I ask to close the thread?
report your first post and being solved.

as for the next time using this:

the sample above if tis >= 100 it will be false, so it check the next condition,
till it's true.

while I didn't add text in the last else handler, that should be when none is true.
but check number start from highest, if start from smallest, the conditions
below it will always be false 😉
This thread is closed due to being reported as solved. If you need it reopened, report it to let us know. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/conditional-branches-and-variables-only-operation-condition-works-and-only-if-value-is-0.176095/