|
Jabnky Newbie
Joined: 03 Nov 2001 Posts: 7 Location: USA
|
Posted: Sun Apr 21, 2002 8:11 pm
Button that does a Trigger |
I haven't coded for a long time so i am rusty! I want to create a button that if my magic points is more that 30 it will cast a spell.
WhatnoW?? |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sun Apr 21, 2002 10:26 pm |
Is it a button you want or a trigger?
Buttons are usually used for things that you DON'T want to happen automatically. Triggers are for things that you DO want to happen automatically. For a trigger (I'm assuming you have a prompt which provides MP's):
#TR {(%d)MP} {#IF (%1 > 30) {cast spell}}
For a button, you could use something like this alias as the button's command (it assumes that you have the number of MP in a variable):
#AL buttonspell {#IF (@MP > 30) {cast spell}}
LightBulb
Vague questions get vague answers |
|
|
|
Jabnky Newbie
Joined: 03 Nov 2001 Posts: 7 Location: USA
|
Posted: Sun Apr 21, 2002 11:02 pm |
Thanks lightbulb for the info., and the button thing, i would like to use it to turn on the trigger. Is this possible because i don't want my mage stuff mixing in with my other characters.
WhatnoW?? |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Apr 22, 2002 1:51 am |
Sure. Just assign the trigger to a class and then use the button to toggle the class.
#TR {(%d)MP} {#IF (%1 > 30) {cast spell}} {mage}
#BUTTON mage1 {NonMage} {#T+ mage} {Mage} {#T- mage}
I don't use buttons much, but I think that will work.
LightBulb
Vague questions get vague answers |
|
|
|
sp000n Novice
Joined: 04 Jul 2001 Posts: 32
|
Posted: Mon Apr 22, 2002 7:46 am |
Also.. if the triggered action is something you want to be able to occasionally do manually, define it as an alias. Tie the button to the alias.
|
|
|
|
|
|