Converting selected list option from number to string

Discuss macro implementations, ask for macro help (to share your creations, see User Creations, probably either Campaign Frameworks or Drop-in Resources).

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice

Post Reply
MandyRae
Cave Troll
Posts: 53
Joined: Sat Mar 12, 2016 11:39 am

Converting selected list option from number to string

Post by MandyRae »

I'm trying to create a macro with a drop down list which is populated by the data in a token's property. This much I have completed and functioning.

Where I need the help is converting the numerical value of the selected option over to the string value

Example:
Token A has property called Spells. this property contains magic missile, fireball, and cloud kill.
When I click the cast spell macro, the dialog opens and I select fireball.
I want an output in chat that says "Token A casts fireball"

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Converting selected list option from number to string

Post by wolph42 »

in the input (assuming you use that) function, you can set the option: VALUE=STRING that will return a string instead of the numeric value

MandyRae
Cave Troll
Posts: 53
Joined: Sat Mar 12, 2016 11:39 am

Re: Converting selected list option from number to string

Post by MandyRae »

Many thanks!!

Post Reply

Return to “Macros”