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

Old December 31st, 2020, 06:40 AM
Quote:
Originally Posted by Bloodwolf View Post
So is there a script to delete items that have a specific tag?

Example, a script that would delete all items that have the spell-like ability tags.

The idea is to add this to a template. Particularly the skeletal dragon template. Currently all skeletal templates "delete" all special abilities, but they still show in the Special tab. I want to only delete the spell-like abilities and supernatural abilities.

Code:
~ Disable all special abilities apart from the ones that we bootstrap
      foreach pick in hero from BaseSpec where "!component.BaseFeat & !thingid.xDamRdB & !thingid.xImmCold & !thingid.rDarkVis"
        perform eachpick.assign[Helper.FtDisable]
        nexteach
Is the current script but only disables all special abilities except for what the template boot straps. So it doesn't really help to say disable just a type of special ability.
You can't "delete" things, no. Best you can do is disable them or hide them. The script above is similar to what you'd use.

Code:
foreach pick in hero from BaseSpec where "[tag]"
        perform eachpick.assign[Helper.SpcDisable]
        perform eachpick.delete[Helper.ShowSpec]
nexteach
I'm not on a computer with HL installed at the moment, so I might be wrong about the SpcDisable tag, but it's similar to FtDisable. Deleting Helper.ShowSpec will remove things from the Specials tab. Depending on how scripts are written, either of these tags being present or not may or may not affect whether scripts are run. I do try to make sure scripts don't run if things aren't being shown.

Also, you'll replace [tag] with the tag you want to look for. Take a look at your things and see what tag is on all of them. If memory serves, AbilType.SpellLike will be on all SpellLike abilities (or something like that).

Last edited by Sendric; December 31st, 2020 at 06:43 AM.
Sendric is offline   #1099 Reply With Quote