• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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