Senior Member
Join Date: Oct 2011
Posts: 6,793
|
If you actually want to choose among weapon groups, why not use the existing selection abilities for weapon groups? You can choose among them by applying the fShowWhat.WeaponsGrp tag to your feat. Now ideally, you could then pull the wFtrGroup tag from the chosen selection but it looks like those aren't on the selection picks right now. I will add them for the next release, but if you want to get this working before then you'll have to check the selection and assign an appropriate wFtrGroup to the feat within your script.
Regardless of how it got there, once you have the tag on your feat, foreach through all weapons on the hero looking for an intersect. If you find one, apply both broadcast tags to the chosen weapon and let HL's internal stuff apply the bonuses. Neither of these is tested, tweak as necessary. Version 1 (wait for release): Pre-levels 5000 Code:
doneif (tagis[Helper.FtDisable] <> 0) doneif (field[usrChosen1].ischosen = 0) perform field[usrChosen1].chosen.pulltags[wFtrGroup.?] foreach pick in hero from BaseWep if (eachpick.intersect[wFtrGroup,wFtrGroup] <> 0) then perform eachpick.assign[Broadcast.WepFocus] perform eachpick.pulltags[WepFocus.?] perform eachpick.assign[Broadcast.WepSpec] perform eachpick.pulltags[WepSpec.?] endif nexteach perform hero.pushtags[WepFocus.?] perform hero.pushtags[WepSpec.?] Pre-levels 5000 Code:
doneif (tagis[Helper.FtDisable] <> 0) doneif (field[usrChosen1].ischosen = 0) if (field[usrChosen1].chosen.tagis[thingid.selWGrpAxe] <> 0) then perform assign[wFtrGroup.Axes] elseif (CHECK THE NEXT AND SO ON) ASSIGN THE RIGHT TAG AND SO ON endif foreach pick in hero from BaseWep if (eachpick.intersect[wFtrGroup,wFtrGroup] <> 0) then perform eachpick.assign[Broadcast.WepFocus] perform eachpick.pulltags[WepFocus.?] perform eachpick.assign[Broadcast.WepSpec] perform eachpick.pulltags[WepSpec.?] endif nexteach perform hero.pushtags[WepFocus.?] perform hero.pushtags[WepSpec.?] |
#11 |
Senior Member
Join Date: Nov 2009
Location: Jonesboro, AR (USA)
Posts: 858
|
Thanks, Aaron (and thanks to you as well, Shadow)!
That's what I was aiming for, and just not quite getting there. I'll wait for the next release, probably, as that looks much more elegant. Any idea when that will be? (Not rushing you, just looking for a ballpark). |
#12 |
|
|