There are a few methods to get a string for the value pf the User Selection choice in an edge.
For example, if you want the name it is
powerName = field[usrChosen1].chosen.field[name].text
If you want the id of a Power, it is
powerID = field[usrChosen1].chosen.tagids[Power.?]
But what I cannot figure out is how to use them in a comparison statement. For example, let's say that I want to have an if statement for if the power has the Zombie name, or perhaps Power.powZombie id. A simple if statement with an = does not work, or at least I could not get it to do so. These print as strings if they are placed into a string, but I cannot get them to compare.
Is there a special syntax to compare a string to another value? Something like if (powerID = "Power.powZombie") or (powerName = "Zombie"). These give an error to one of the sides of the comparison equation. Are these actually using arrays instead?
After I figure this out, I plan to have be able to compare against the userChosen1 of other edges that also have a userChosen1.
For example, if you want the name it is
powerName = field[usrChosen1].chosen.field[name].text
If you want the id of a Power, it is
powerID = field[usrChosen1].chosen.tagids[Power.?]
But what I cannot figure out is how to use them in a comparison statement. For example, let's say that I want to have an if statement for if the power has the Zombie name, or perhaps Power.powZombie id. A simple if statement with an = does not work, or at least I could not get it to do so. These print as strings if they are placed into a string, but I cannot get them to compare.
Is there a special syntax to compare a string to another value? Something like if (powerID = "Power.powZombie") or (powerName = "Zombie"). These give an error to one of the sides of the comparison equation. Are these actually using arrays instead?
After I figure this out, I plan to have be able to compare against the userChosen1 of other edges that also have a userChosen1.