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

Old July 12th, 2020, 04:20 AM
Sorry. I was so focused on the foreach loops I failed to notice only the chosen weapon would be affected even though you explicitly told me.

Code:
~ Assign the appropriate tag to all weapons that meet the criteria
doneif (field[usrChosen1].ischosen = 0)

var wpn as string
var crit as string

wpn = field[usrChosen1].chosen.tagids[thingid.?]
if (field[usrChosen1].chosen.tagis[thingid.wGreatclub] <> 0) then
  crit = "wCritMult.3"
else
  crit = "wCritMult.4"
endif

foreach pick in hero from BaseWep where wpn
  perform eachpick.delete[wCritMult.?]
  perform eachpick.assignstr[crit]
nexteach

Last edited by Sendric; July 12th, 2020 at 04:22 AM.
Sendric is offline   #1006 Reply With Quote