Member
Join Date: Aug 2011
Posts: 73
|
Anyone know the correct syntax for assigning a weapon proficiency in a script?
I think it looks something like this: perform hero.assign[WpnProf.wHammer] I know the WpnProf.wHammer is not correct. |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
In the editor, while you're looking at the script you're writing, select "wHammer" with your mouse. Then, press the "Find Thing" button, and change the "Show: -All Things-" selector to "Melee Weapons". Then, you can find and double-click the name of the weapon you want, and Hero Lab will insert its Id where the mouse cursor was in the script.
|
#2 |
Senior Member
Volunteer Data File Contributor
Join Date: Dec 2008
Posts: 523
|
The weapon Proficiency feat does it like this
Code:
doneif (field[usrChosen1].ischosen = 0) perform field[usrChosen1].chosen.forward[WeaponProf.?] Working on Twilight 2000 4e HL System |
#3 |
Member
Join Date: Aug 2011
Posts: 73
|
Crypto, that is where I got the "perform hero.assign". I need to be able to assign a specific weapon group to the hero, i.e. hammers, light blades, spears, etc.
|
#4 |
Senior Member
Volunteer Data File Contributor
Join Date: Dec 2008
Posts: 523
|
Dwarven Weapon training gives better details... this should work.
Code:
perform hero.assign[WpGrpRqSim.wgAxe] perform hero.assign[WpGrpRqMil.wgAxe] perform hero.assign[WpGrpRqSup.wgAxe] perform hero.assign[WpGrpRqSim.wgHammer] perform hero.assign[WpGrpRqMil.wgHammer] perform hero.assign[WpGrpRqSup.wgHammer] foreach pick in hero from WeaponBase where "(WepGroup.wgAxe | WepGroup.wgHammer)" perform eachpick.field[wpDamFeat].modify[+,2,""] nexteach Working on Twilight 2000 4e HL System |
#5 |
|
|