• 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] help with the spell

Status
Not open for further replies.
Level 3
Joined
Aug 5, 2008
Messages
43
hey can some 1 tell me how to make a passive spell which gains strength on every killed unit (butchers - flash heap) i made it but cos it's an integer it doesent works with decimals it has to be real. So can some1 tell me how to make that spell?
 
Level 7
Joined
Jul 12, 2008
Messages
295
Hey i'm kikac_nngk's friend and i'm telling u that doesn't work.. We have tryed that.. Is there any other way in GUI
 
Level 16
Joined
Feb 22, 2006
Messages
960
so that should work, modify the var like u want (should be something like 0.05,0.10,0.01,0.02,0.04 etc.)

  • gain str
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) belongs to an enemy of (Owner of (Killing unit))) Equal to True
      • ((Killing unit) is A Hero) Equal to True
    • Actions
      • Set str_var = (str_var + 0.50)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • str_var Equal to 1.00
        • Then - Actions
          • Hero - Modify Strenght of (Killing unit): Add 1
          • Set str_var = 0.00
        • Else - Actions
 
Level 22
Joined
Dec 31, 2006
Messages
2,216
You could use a variable which you increase by f.ex. 0.5 whenever your unit kills someone and then set the strength to that value.
Like this:
  • Events
    • Unit - A unit Dies
  • Conditions
    • (Level of Flesh Heap for (Killing unit)) Greater than 0
  • Actions
    • Set strength = (strength + 0.50)
    • Hero - Modify Strength of (Killing unit): Set to (Integer(strength))
If you have more than 1 unit with that ability just make the variable "strength" to an array variable.
 
Level 7
Joined
Jul 12, 2008
Messages
295
Just 1 more thing guys how can we make so when our hero kills a hero more strength to be given and when a non-hero unit dies less strength to be given? Thanks
 
Level 5
Joined
Dec 18, 2007
Messages
205
This should work, but it doesn't stack for more heroes with the Flesh Heap ability.
You can modify the values for every level, if needed.

  • Events
    • Unit - A unit Dies
  • Conditions
    • ((Dying unit) belongs to an enemy of (Owner of (Killing unit))) Equal to True
    • (Level of Flesh Heap for (Killing unit)) Greater Than 0
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • ((Dying unit) is A Hero) Equal to True
      • Then - Actions
        • -------- Modify this for every level if you want. --------
        • Set strength = (strength + 0.50)
      • Else - Actions
        • -------- Modify this for every level if you want. --------
        • Set strength = (strength + 0.05)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • strength Greater Than 1.00
      • Then - Actions
        • Hero - Modify Strength of (Killing unit): Add 1
        • Set strength = (strength - 1.00)
      • Else - Actions
 
Last edited:
Level 5
Joined
Dec 18, 2007
Messages
205
You could at least say sth. like "please find mistakes" or kind of.
I'll look at if, if you post it, but I don't have much time atm. Myb someone else looks at this before i do.
 
Level 7
Joined
Jul 12, 2008
Messages
295
Don't worry. We have made the spell just like you said bReathl3sS and it works perfectly. Thanks man.. You will get credit in our map. We won't forget ur servises... Thanks to all other guys who helpt us...
 
Status
Not open for further replies.
Top