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
nazradin
Apprentice


Joined: 23 Mar 2003
Posts: 114
Location: New Zealand

PostPosted: Thu Sep 25, 2003 7:13 pm   

toggle button question
 
my spell caster uses button macros inorder to cast spells

usually i have it set so that when things die they are automatically searched, but there are times when i wish to not auto search so that i can skin if they are a suitable critter


this is my orginal script

@thatone = first
T+ Spellsearch
prep 702
stance offensive
cast at @thatone @monster
#alarm +1 {
look
#T- Spellsearch
}

which works fine casts the spell and if things die with in 1 second of the cast death message text triggers searching

this is what i have changed it to

@thatone = first
#if (@castRT <= 1) {
#if (@spellskin = 1) {#T+ Spellsearch} {#T- Spellsearch}
prep 702
stance offensive
cast at @thatone @monster
#alarm +1 {
look
#T- Spellsearch
}
}

couple with a button

#BUTTON 270 {autosearch } {} {autosearch on|autosearch off} {#T+ Spellsearch;@spellskin = 1|#T+ Spellsearch;@spellskin = 0} {} {} {} {Size} {90} {17} {Pos} {200} {1} {} {0|0} {} {} "" {Inset} {} {} {3}


it seems to work in a reasonable manner, what i wanted for the qutoserch on/off button was to use a toggle button so it is easy to see on/off just by looking at the button , but every time i try and set up a toggle button it either doesnt change the @spellskin varible or it stays only in the @spellskin = 1 state, despite having all both states set.


a; if anyone can see a way to make the actual cast script work in a neater fashion that would be great as it sometimes seems a little screwy with searching. for each spell i have a button loaded with spell info and change things such as weather i need to change stance or not seems to work better than using a generic cast alais and loading that info onto the button

b: any ideas what the reason is i cannot use a toggle button here?
i have had to add a guage button to taht shows the actual @spellskin varible as that was the only way i could get it so i can know what state it is in <1 or 0>


hopes this makes sense


Naz
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Sep 30, 2003 6:51 am   
 
I don't see why you can't use a toggle button.

Button States tab
Kind: Toggle
    State: Button Up
      Caption: autosearch on
      Value:
        #T- Spellsearch
        @spellskin = 0

    State: Button Down
      Caption: autosearch off
      Value:
        #T+ Spellsearch
        @spellskin = 1

Position/Size tab
As desired
Advanced tab
Inset checked
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