Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
omegacon
Newbie


Joined: 08 Jan 2021
Posts: 4

PostPosted: 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"
Code:
#SHOW %1


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?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4671
Location: Pensacola, FL, USA

PostPosted: 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
Reply with quote
omegacon
Newbie


Joined: 08 Jan 2021
Posts: 4

PostPosted: 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.
Reply with quote
omegacon
Newbie


Joined: 08 Jan 2021
Posts: 4

PostPosted: 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.
Reply with quote
omegacon
Newbie


Joined: 08 Jan 2021
Posts: 4

PostPosted: 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.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net