• 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.

Get Unit Weapon Integer Field

Status
Not open for further replies.
Level 1
Joined
Jun 10, 2019
Messages
4
Hello,

the new functions that come with patch 1.31 like 'get Unit weapon Integer field' for example are ment for getting or setting the values during the game, aren't they?
Now my question is: the function from above has a value called 'at index: 0'. What does it mean?
for example: This function allways returns 0...i tried it with Intex -10 to 10...same result. My unit has base damage set to 100 in objekt editor.

Event
-Player 1 types a chat message containing 'test' as...

Action
-Display to all players the text (String((Unit: 'my Unit' Weapon Integer Field: Attack Damage Base at Intex: 0
 

Attachments

  • index.JPG
    index.JPG
    18.2 KB · Views: 329
Level 1
Joined
Jun 10, 2019
Messages
4
Thanks Wrda,
the triggering Unit has only attack 1 enabled. Base damage is set to 100. The result is still 0. The old function 'unit - base damage' works fine..
 

Attachments

  • index2.JPG
    index2.JPG
    52.8 KB · Views: 180
Thanks Wrda,
the triggering Unit has only attack 1 enabled. Base damage is set to 100. The result is still 0. The old function 'unit - base damage' works fine..

I use the JASS function BlzSetUnitBaseDamage (result of converting "unit - base damage" into text) and I have the following behavior :
- Works fine if I play with Warcraft 1.30.4, the damage amount is set
- Doesn't work if I play with Wacraft 1.31.XXX, the damage amount is unchanged.

When you say it works fine for you, are you playing with 1.30.4 or 1.31 ?

Edit: it seems the reason is because in 1.30.4 weapons are 1-indexed (weapon 1, weapon 2) and in 1.31.XX weapons are 0 indexed (weapon 0, weapon 1). And those Blizzard crappy developers don't convert the value...
 
Last edited:
Status
Not open for further replies.
Top