Token Property codes...

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
Klaive
Cave Troll
Posts: 36
Joined: Wed Jun 18, 2008 3:03 pm

Token Property codes...

Post by Klaive »

Can the [switch():] roll option be used within a token property?

IE:

Code: Select all

property_1: "bob"

Code: Select all

Property_2: {switch(property_1): case "joe": property_3 = 1; case "bob": property_3 = 2; case "sam": propert_3 = 3; case "slim": property_3 = 4; default: property_3 = ""}

Code: Select all

property_3: ""
<!-- above are examples of properties that I would theoretically create if said roll option is available for use within a token property. -->


Klaive
Cave Troll
Posts: 36
Joined: Wed Jun 18, 2008 3:03 pm

Re: Token Property codes...

Post by Klaive »

wolph42 wrote:yes. two things:
use [r:] instead of {}
typo in case 'sam'.
Thanx Wolf42, two more questions now.

You state to use brackets [r: ], instead of braces { }. This will not cause an error? As every tutorial I have read through, states to only use braces in token properties, not brackets.

Also, you state there is a typo in case 'sam'. Can you please explain? That case looks identical to the others other than the case name and value given.

Netsky
Cave Troll
Posts: 25
Joined: Sat Feb 14, 2015 4:35 am

Re: Token Property codes...

Post by Netsky »

Klaive wrote:Also, you state there is a typo in case 'sam'. Can you please explain? That case looks identical to the others other than the case name and value given.
it says "propert" instead of property

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

Re: Token Property codes...

Post by wolph42 »

Netsky wrote:
Klaive wrote:Also, you state there is a typo in case 'sam'. Can you please explain? That case looks identical to the others other than the case name and value given.
it says "propert" instead of property
what he said. and yes {} and [r:] serve the same purpose (for that). however with the {} nesting limit its good practice to use [r:] whenever possible.

Post Reply

Return to “MapTool”