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
Pauley
Beginner


Joined: 17 May 2024
Posts: 13

PostPosted: Fri Jul 05, 2024 9:54 am   

Button to enable/disable a trigger
 
I have a trigger for my healer which will do a "party check" command for each "new round" of combat
so that I can know who to heal and not.

However, this "party check" command is spammy when I'm not playing my healer, and thus I want to create a button which turns this trigger on and off.

Trigger *** NEW ROUND *** TODO party status percent

This trigger has ID 32, can i use this in my button to toggle it on and off? Or maybe I'm forced to create/destroy the trigger with the button?

Any examples of how this could be implemented would be greatly appreciated
Reply with quote
Pauley
Beginner


Joined: 17 May 2024
Posts: 13

PostPosted: Fri Jul 05, 2024 2:38 pm   Re: Button to enable/disable a trigger
 
Pauley wrote:
I have a trigger for my healer which will do a "party check" command for each "new round" of combat
so that I can know who to heal and not.

However, this "party check" command is spammy when I'm not playing my healer, and thus I want to create a button which turns this trigger on and off.

Trigger *** NEW ROUND *** TODO party status percent

This trigger has ID 32, can i use this in my button to toggle it on and off? Or maybe I'm forced to create/destroy the trigger with the button?

Any examples of how this could be implemented would be greatly appreciated



Somewhat of a workaround, but it works - just make the same trigger for both button toggles, just that one state does something and the other state still triggers but does nothing.
Reply with quote
shalimar
GURU


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

PostPosted: Sun Jul 07, 2024 11:35 pm   
 
You can do that.
You need to give the trigger an ID of "PartyChecker"
then your button will do the following:

Code:
#SWITCH (%trigger(PartyChecker))
  (0) {#T+ PartyChecker}
  (1) {#T- PartyChecker}
_________________
Discord: Shalimarwildcat
Reply with quote
Pauley
Beginner


Joined: 17 May 2024
Posts: 13

PostPosted: Mon Jul 08, 2024 9:51 am   
 
shalimar wrote:
You can do that.
You need to give the trigger an ID of "PartyChecker"
then your button will do the following:

Code:
#SWITCH (%trigger(PartyChecker))
  (0) {#T+ PartyChecker}
  (1) {#T- PartyChecker}


Ah yes, I read about this way of switching. I found the trigger ID in the xml part in the GUI, how would I go about giving it its own ID ?
Reply with quote
shalimar
GURU


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

PostPosted: Mon Jul 08, 2024 10:18 am   
 
You can either edit the xml directly, id="PartyChecker"

Or you can click the 'More' button at the bottom of the package editor window and just fill in the panel labeled ID.
_________________
Discord: Shalimarwildcat
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