• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Spell] trigger change primary attribute

Status
Not open for further replies.

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
Before I get your hopes up, this doesn't work yet:
  • Unit - Set Unit: Paladin 0001 <gen>'s Integer Field: Primary Attribute ('upra') to Value: 1
I believe the attributes are ordered as: Str = 1, Int = 2, Agi = 3.

So once it does work (which could take anywhere from 6 months to never) you can use this action.
 
Level 5
Joined
Jan 2, 2013
Messages
84
i did the bear form things, didnt work. its doesnt change attriubte, primary attribute. it change attack damage and attack type so far
 
Level 19
Joined
Jan 1, 2018
Messages
739
You can use BlzSetHeroPrimaryStat takes unit whichUnit, integer value returns ? for this, where 1=str, 2=int, 3=agi.
This native is not listed in common.j, so I don't know if you can use it in GUI/jass, but it works with lua.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
You can use BlzSetHeroPrimaryStat takes unit whichUnit, integer value returns ? for this, where 1=str, 2=int, 3=agi.
This native is not listed in common.j, so I don't know if you can use it in GUI/jass, but it works with lua.
I tested this in Lua and it actually works differently than you'd expect. It sets your Heroes Primary Attribute AMOUNT to the given value, instead of changing the Attribute Type.

So by using this with a Value of 1 on the Archmage it set his Intelligence to 1.
 
Level 19
Joined
Jan 1, 2018
Messages
739
I tested this in Lua and it actually works differently than you'd expect. It sets your Heroes Primary Attribute AMOUNT to the given value, instead of changing the Attribute Type.

So by using this with a Value of 1 on the Archmage it set his Intelligence to 1.
I must've remembered incorrectly, I guess there is no native to change the primary stat then.
 
Status
Not open for further replies.
Top