View Single Post
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old September 19th, 2013, 06:59 AM
I am working on a template that removes racial abilities (such as the Dwarf's Sturdy ability or an Elf's Immunity to Sleep), and I've hit a snag. This is what I have at the moment:

Code:
   var race as string
   var srchxpr as string
   perform hero.findchild[BaseRace].setfocus
   race = focus.idstring
   srchxpr = "SpecSource." & race
   debug srchxpr

   foreach pick in hero from BaseSpec where srchxpr
    perform eachpick.delete[Helper.ShowSpec]
   nexteach
The problem I'm running into is that the race variable is returning a value that doesn't really help. For example, if my character is an Elf, its returning Elf2. This results in none of the racial abilities being removed because all of them use the tag SpecSource.Elf not SpecSource.Elf2. Is there another way to find the race, perhaps using the Race.? tags?
Sendric is offline   #1 Reply With Quote