[SOLVED] Comment in conditional branch?

Hello!
Is there any way to have check for (Specific) Comment with conditional branch?
not really

by default comments are exactly that - text comments without any function or value.

some scripters have abused the comment to store data that they would then extract, but that is not an easy process. And it is almost impossible to make a conditional check on them.

but that is most likely what you're trying to do - forcing a script that was added and never intended for logical branches to accept them.
and as such you need to rewrite the script to check for that before it can happen.
I am using CSCA Dungeon Tools
and dungeon tools are triggered by events via comments..
so what i am trying to do is for a event to check if the comment is there, so there will be actions.
Is there any way to have check for (Specific) Comment with conditional branch?
The comment check is entwined into the script.
You could possibly do a $game_map.csca_check_comment(event, tool)
but you would have to specify what event and what tool.
Not very easy.
The script does this for the event that is touched by the tool equipped.

Not exactly easy to do a check on that.

Are you looking to do a check for the existing comments? ARROW_ACTIVATE for example.
Are you looking to do a check for the existing comments? ARROW_ACTIVATE for example.
Yes exactly!
Actually the thing is ARROW_ACTIVATE activates (the default) self switches (they are 4. A,B,C,D.) but i use all the default self switches and then i need to use the More Self-Switches script by game_guy (which gives unlimited self swtiches) and i can't... ARROW_ACTIVATE only works with the default ones..
This is experimental, not tested
looking at the code, my first guess is this

script not required
This is experimental, not tested
I could help by testing it?

When player hit the event this happens. (it doesn't wait untill the scripted switches, it does that from the first, default ones.)
Pic.png
ARROW_ACTIVATE only works with the default ones..
Perhaps you can modify your pages so that the ARROW_ACTIVATE is on one of the pages with A, B, C or D.

Interesting how that method is provided a number for the self switch. I thought the event itself was passed to it. Or is it event #40 that is getting checked?
Perhaps you can modify your pages so that the ARROW_ACTIVATE is on one of the pages with A, B, C or D.
It seems i can't do otherwise.. even if i want to.
So, in conclusion, ARROW_ACTIVATE only works with the game's default Self switches.

Or is it event #40 that is getting checked?
That's correct
Ok, I added a get event line. Hopefully it will do something besides give an error.
i think i am doing something wrong..? maybe i have to rename something?
pic2.png
do you have my script below csca dungeon tools? if yes, then comment out that line
When i delete the line, the pop up window doesn't show but the script don't work.
When i place the script above csca dungeon tools and keep the line, this pop up shows when player throws arrow on event
pic3.png


this is my setup maybe it helps
example.png
ok so after testing this, all you actually need to do is nothing.
My patch is not required.
I set up the same thing as you (sort of - I used the csca dungeon tools demo)
Made a new page with the self switch E and did the same command self_switch("E",true) and it worked fine.

So do you need to actually check the comment or do you have a script incompatibility?
I made a new project to test it on blank settings and without scripts and still it doesn't work though..
Can you show me a print screen of your settings (even if they are not the same as mine) just to see maybe i am doing something wrong..
Using the arrow event in CSCA dungeon tools demo
1654706041668.png

1654706060238.png
I don't get it.. how it changes pages (when you hit with the arrow) without having the ARROW_ACTIVATE comment on the pre-last page?
how it changes pages
The first page in the demo has the arrow activate, from there it does a graphic change and changes to self switch A. which turns on a switch and changes the self switch to B, then on that page (since it is parallel process) I added the switch command and it changed to the self switch E

Are you saying it won't work with the switch on D then it activates the arrow?
Let me test that. I do think you can just add that into the script for the self switch.

OK, so you need to add into the script whatever self switches you are going to use.
The design of the script is to advance the self switch one level when activated.
A goes to B goes to C etc.

CSCA dungeon tools line 800 switches = ["A","B","C","D"]
Add in there E.
switches = ["A","B","C","D","E"]
1654716783535.png

1654716809824.png

1654716868417.png
EDIT so if anyone wants to see if this is solved (because now it's 2 pages thread):
Yes it's working! Roninator2 found solution within the script (as seen above)
The ARROW ACTIVATE to be enabled needs a self switch.
I edited my post above after you posted

Original thread: https://forums.rpgmakerweb.com/threads/solved-comment-in-conditional-branch.148309/