View Single Post
dungeonguru
Senior Member
 
Join Date: May 2016
Posts: 608

Old January 17th, 2018, 03:25 AM
Your foreach statement is a Chicken/Egg problem. a weapon doesn't become a "pick" in "hero" until assigned by purchasing it. So what is happening is that you can't become proficient until a weapon has been purchased and becomes part of the hero.

Here's a solution:
Code:
foreach thing in BaseWep where "!wProperty.Heavy"
     ~ grab all weapon proficiency tags from the weapon
     perform eachthing.pulltags[WepProf.?]
nexteach
    
~ Now push all tags to the hero
perform hero.pushtags[WepProf.?]
This foreach statement loops through all things in the BaseWep category without the wProperty.Heavy tag and pulls the Proficiency tags into local memory table.

After it loops through all the weapons, it pushes all the tags it collected out to the hero.
dungeonguru is offline   #2 Reply With Quote