|
omegacon Newbie
Joined: 08 Jan 2021 Posts: 4
|
Posted: Fri Jan 08, 2021 9:47 pm
Using #RAISE across windows. |
So I am trying to take a list of text lines that I represented as a string list from one window and output it to another window (with some minor processing in-between). The approach that seemed like it would work would be to define a custom event under the output window and trigger it from the input window.
Here is my Event definition, name of the event is "doneTargs" and the window its defined under is called "TargWindow"
and here is the relevant part of initial trigger that should fire the event. Its defined under a separate window.
Code: |
#IF %regex(%1, "^$") {#FORALL @entities {#RAISE doneTargs %i};#STATE 0} |
However I am not having any luck. Is there something I am missing here? |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Fri Jan 08, 2021 11:07 pm |
Without seeing the text in question my first suggestion is:
You could always reformat the line with a #SUB before you #CAPTURE it to another window.
If it is never in a window to start with, you could use #ALL to #PRINT it in every window.
Alternatively, put your #EVENT into a Module, so that it is seen by all windows by default and scope is less of an issue. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
omegacon Newbie
Joined: 08 Jan 2021 Posts: 4
|
Posted: Fri Jan 08, 2021 11:22 pm |
Ahh ok, I will try some of those soon. For context the text looks like I am receiving in the original window looks like.
Code: |
A mountain goat is perched here on a treacherous ledge.
A squirrel sitting |
its just a list of possible targets. I want to take this put it in a list for further operations and display it in reverse in the other window. I have it in the list and reversed in there, displaying is just the final step for me. |
|
|
|
omegacon Newbie
Joined: 08 Jan 2021 Posts: 4
|
Posted: Sat Jan 09, 2021 12:09 am |
Ok I was able to try turning the window to a module. It actually triggered the Event which is a step forward, but its printing in the original window I tried sending it from. I am not sure if using #ALL #PRint would work for me, as I have a couple windows. I am thinking about if I could get #SUB/#CAPTURE for this solution, not completely sure if its possible atm.
|
|
|
|
omegacon Newbie
Joined: 08 Jan 2021 Posts: 4
|
Posted: Sat Jan 09, 2021 5:42 am |
I did end up solving this. It was pretty tricky, I tried using counters etc... as its really hard to do something when a trigger ends. But since I explicitly use a regex to detect an empty line and call [code]#STATE 0[\code] in the input window I was able to show a new custom string that would never appear naturally in game. I then used a seperate trigger which the new window would use as the signal to start outputting everything in the list.
|
|
|
|
|
|