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

Status
Not open for further replies.
Level 3
Joined
Dec 2, 2013
Messages
25
Hi everyone, I'm trying to use this system :


The goal is to get unit's armor.

But I'm very bad at coding and I don't know how to use it.
It want to be able to use the "real" value of the armor and set it into a variable.
I tried something like this but it didn't works :

set udg_real = call GetUnitArmor(udg_unit)

real = variable (type real)
unit = variable (type unit)

Can someone help me ?

Shrrignien
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
What you did is the correct way to try to use that code. What exactly “doesn’t work” about it?

I could be wrong but reading a unit’s current armor is now a thing there is a GUI action for, as far as I recall. You should not have to use some code to find the armor value.
 
Level 3
Joined
Dec 2, 2013
Messages
25
I have a synthax error when compiling the map. The test map linked to the thread works fine, but I just can't store the value into a variable.... I don't know how to do so.

I'm using an old warcraft 3 version, so this is probably why I don't have access to this GUI command : i'm using the 1.27.1 version.
 
Status
Not open for further replies.
Top