• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

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 44
Joined
Feb 27, 2007
Messages
5,555
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