View Single Post
TheIronGolem
Senior Member
 
Join Date: Feb 2015
Posts: 676

Old April 18th, 2021, 07:45 PM
The reason you're getting errors is because that script is looking for picks on the hero called userChosen1 and usrChosen2, which don't exist. What you are looking for is the transition "chosen", like so:

Code:
doneif (field[usrChosen1].ischosen = 0)
field[usrChosen1].chosen.field[BonComp].value += 2
The first line basically says, "Hey, did the user pick a skill yet? If not, then don't do anything else because we don't want errors when we try to give bonuses to a skill we haven't picked".

The second line starts from the ability's 'usrchosen1' field, then uses the 'chosen' transition to move to the pick selected in that field (i.e. the chosen skill), and is then able to apply the value to the BonComp field.
TheIronGolem is offline   #2 Reply With Quote