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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
ljungbergjj
Newbie


Joined: 08 Sep 2004
Posts: 6

PostPosted: Wed Sep 08, 2004 12:40 am   

i need help with triggering buttons
 
im wondering how to trigger buttons?
is it #trigger {Hi} {#BU 3}
Reply with quote
ljungbergjj
Newbie


Joined: 08 Sep 2004
Posts: 6

PostPosted: Wed Sep 08, 2004 12:42 am   
 
#trigger {event} {Button number}???
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Sep 08, 2004 1:52 am   
 
Your first post should be a working example of what your thinking of, and your second post nicely summarizes the method.

To locate button numbers you will likely have to look at the class script they are contained in. Also button numbers change between loads of your settings, basically if your create 3 buttons in a blank file numbering them 700, 800, and 701. Then save, kill, and reload that file they will be renumbered to 1, 3, and 2 respectively. I would reccommend using IDs instead of numbers as they are guaranteed to remain consistent.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
ljungbergjj
Newbie


Joined: 08 Sep 2004
Posts: 6

PostPosted: Wed Sep 08, 2004 4:13 am   
 
ok so i have a button labeled ASK i think button number 3
and when i see something like {A bid flies overhead}
do i type #trigger {A bird flies overhead} {#BU 3}
Reply with quote
ljungbergjj
Newbie


Joined: 08 Sep 2004
Posts: 6

PostPosted: Wed Sep 08, 2004 4:28 am   
 
how do i tell what number my button is, just frmo counting from the right?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Sep 08, 2004 4:58 pm   
 
No, count from the left.

Another way to control a toggle button is by assigning a variable to it on its Advanced tab. Clicking the button will change the variable from 0 (up) to 1 (down). Changing the variable from one value to the other will likewise change the condition of the button. You can put this command (with your variable name) in your trigger.
Code:
#IF (@buttonvar) {#VAR buttonvar 0} {#VAR buttonvar 1}
_________________
LightBulb
Senior member

Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious.
Reply with quote
Backu
Novice


Joined: 24 Feb 2003
Posts: 36
Location: USA

PostPosted: Sat Sep 11, 2004 6:06 pm   
 
Quote:
#trigger {event} {Button number}???


That creates a new trigger, not executes a button.
_________________
-Backu Zethara
Reply with quote
mr_kent
Enchanter


Joined: 10 Oct 2000
Posts: 698

PostPosted: Sat Sep 11, 2004 11:03 pm   
 
Instead of trying to guess what the problem is, may I suggest you make a post such as:

This is my button definition...

This is (what I see/what happens) when I want my button activated...

This is what I have tried...

Hopefully then someone will be able to give some useful information. Wink
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Sep 12, 2004 6:32 am   
 
Yes, #TRIGGER makes a trigger. That's what ljungbergjj wanted: A trigger to control the button.
_________________
LightBulb
Senior member

Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious.
Reply with quote
thargy
Beginner


Joined: 10 Aug 2004
Posts: 20
Location: UK, Uganda

PostPosted: Thu Sep 16, 2004 10:12 am   
 
You can of course give the button an ID and then use #BU {id}. works for me fine.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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