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

[Trigger] How to convert attribute to real?

Status
Not open for further replies.
Level 2
Joined
Mar 27, 2008
Messages
24
I made this trigger:
  • Yeo
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) is A Hero) Equal to True
      • (Unit-type of (Killing unit)) Equal to Yeo
    • Actions
      • Hero - Modify Agility of (Killing unit): Add (((500 / 100) x (Level of Experience for (Killing unit))) + 0)
it worked fine then i changed the value 500 to 4:

  • Yeo
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) is A Hero) Equal to True
      • (Unit-type of (Killing unit)) Equal to Yeo
    • Actions
      • Hero - Modify Agility of (Killing unit): Add (((4 / 100) x (Level of Experience for (Killing unit))) + 0)
No agi point gained till kill count is 100. Can someone help me solve this? :confused:
 
Level 2
Joined
Mar 27, 2008
Messages
24
if you want to do it with reals you have to do it like this:
create a var: (real)
a unit dies
equal to blub
set var = var + 0.05
if var equal to 1 then
hero modify agi of hero add 1 agi

then i must reset the var after that. Thx
 
Status
Not open for further replies.
Top