• 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] Incinerate GUI

Status
Not open for further replies.
Level 4
Joined
Oct 6, 2009
Messages
85
Hi guys i wanted to make an ability like dota ursa warrior's fury swipes i know it is based on an ability incinerate but i dont want it to have a orb effect so i can use other orbs. so is there a way to remake this ability in GUI?
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
Yes, it is possible to make it GUI.
The basic idea of the spell is that it stacks its effect infinitely. The calculation is [bonus damage] * [number of stacks].
The easiest approach would be to use hashtable, where you save the number of stacks for that unit and when you need it, you would load it and do things with it (e.g. the explosion when unit with incinerate debuff dies).

If you want the spell to also apply buff on the target, then you would need some dummy ability as a placeholder for the buff and a dummy that casts it on units. The buff serves as a check to know if that unit is under effect of the spell or not, but this will limit the spell, so 1 unit can be afflicted only by 1 Incinerate. That means in case of 2 Fire Lords grouping on 1 enemy, their incinerate would become highly ineffective, as they would replace the number of stacks from one to another.

Or they could actually stack the one and same debuff, the problem would be when unit dies, how much damage should the explosion do (in case where the level of Incinerate differs for each Fire Lord - the explosion damage differs as well)

Without a buff you could make them stack their own damage on same unit without replacing those values (of course, this approach can be used with buff as well, but it would look strange imo).

The fact remains though, that the easiest way would be to use hashtable that would keep track of number of stack on each afflicted unit.
Of course all the problems above are assuming you want the spell MUI as well.
 
Level 13
Joined
Jul 16, 2012
Messages
679
  • Untitled Trigger 001
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) is in Group) Equal to True
    • Actions
      • Set TempPoint = (Position of (Attacked unit))
      • Set TempPlayer = (Owner of (Attacking unit))
      • Unit - Create 1 Dummy for TempPlayer at TempPoint facing Default building facing degrees
      • Unit - Add IncinerateArrow to (Last created unit)
      • Unit - Order (Last created unit) to Neutral Fire Lord - Incinerate (Arrow) (Attacked unit)
      • Custom script: call RemoveLocation( udg_TempPoint)
  • Untitled Trigger 002
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Ability being cast) Equal to Incinerate
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Learning Hero) is in Group) Equal to True
        • Then - Actions
        • Else - Actions
          • Unit Group - Add (Triggering unit) to Group
Check it if this work... :wink:
 
Level 4
Joined
Oct 6, 2009
Messages
85
thanks for the reply but i have a problem cause i dont realy know how to use hashtables and yes i wanted to make it mui cause many unit will be using this ability
 
Level 4
Joined
Oct 6, 2009
Messages
85
does incinerate (arrow) also does the increasing damage thingy cause i checked it in the object editor and does not have the damage options maybe making a dummy unit and add the passive incinerate and make it attack then kill it after it attack once?

edit: i just realized if i make a dummy unit attack the enemy i will have to change the dummy units damage the same to my hero's damage
 
Level 13
Joined
Jul 16, 2012
Messages
679
i just realized if i make a dummy unit attack the enemy i will have to change the dummy units damage the same to my hero's damage

lol... dont use the dummy to attack the unit

If you want to check the lvl of the dummy's ability.. just add this
  • Unit - Set level of IncinerateArrow for (Last created unit) to (Level of Incinerate for (Attacking unit))
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
Can't say for sure, but Fire Lord does have the Arrow version, however if you level that ability up in game and check level of the Arrow version and Non-Arrow version, then you will find out that the Non-Arrow version is level up (but he does not have it in object editor). So it may be that the Arrow version is either swapped with the non-arrow version at the start of the game, or it takes data from the non-arrow version.


About hashtables:
First, you have to create hashtable and save it into variable:
  • Untitled Trigger 001
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set Hash = (Last created hashtable)
Hashtable can store practically everything (but watch out, some of the GUI options for saving stuff can crash your world editor, so if you are about to use one such action and you're not sure if its the faulty one or not, then you better save your map so you won't lost any data :) )

Saving stuff works like this:
  • Hashtable - Save *something* as CHILD of PARENT in HASHTABLE
Child and Parent are your "key" words for identifying your saved stuff - it can be a string (= a sequence of characters) or an integer number (number without decimal point).
It's cool, because each unit, destructible (and many other things) are handles - that means they have their unique identification number upon creation. You can get this number and use it as a Child or Parent. Since this number is unique (and quite long), it's quite unprobable that you will accidentally replace stuff saved under this number.

Loading stuff from hashtable looks like this:
  • (Load CHILD of PARENT from Hash)
(note, this is an edited version, usually you have to use the loaded stuff immediately or set it into variable)

Anyway, the way game loads stuff from hashtable works like this:
1) Finds name of hashtable you specified
2) Find parent you specified
3) Finds child you specified
4) Finds the correct type of thing you want to load (e.g. integer, point, unit, ...)
5) Loads the value it found.

If it for example doesn't find specified parent, it stops there and won't load a thing (or may load the default value of the type of handle you wanted... e.g. default value for integers is 0; for boolean is false, etc.))
 
Level 4
Joined
Oct 6, 2009
Messages
85
  • UNT
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Incinerateer for (Attacking unit)) Not equal to 0
    • Actions
      • Hashtable - Save ((Load (Key (Attacking unit)) of (Key (Attacked unit)) from Hashdamage) + 50) as (Key (Attacking unit)) of (Key (Attacked unit)) in Hashdamage
      • Set Integer = (Load (Key (Attacking unit)) of (Key (Attacked unit)) from Hashdamage)
      • Unit - Cause (Attacking unit) to damage (Attacked unit), dealing (Real(Integer)) damage of attack type Chaos and damage type Normal
is this correct? it seems to work but is this MUI?
 
Level 13
Joined
Jul 16, 2012
Messages
679
Or If you try to use MUI

I HAVE A EXAMPLE

  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Spell
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Spell_Index Equal to 0
        • Then - Actions
          • Trigger - Turn on Untitled Trigger 002 <gen>
        • Else - Actions
      • Set Spell_Index = (Spell_Index + 1)
      • -------- Setup those array --------
      • Set Spell_Player[Spell_Index] = (Triggering player)
      • Set Spell_Memory[Spell_Index] = Hello
      • Set Spell_Duration[Spell_Index] = 1.00
  • Untitled Trigger 002
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Spell_Loop) from 1 to Spell_Index, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Spell_Duration[Spell_Loop] Equal to 0.00
            • Then - Actions
              • Game - Display to (Player group(Spell_Player[Spell_Loop])) for 10.00 seconds the text: Spell_Memory[Spell_Loop]
              • -------- RecycleIndex --------
              • Set Spell_Index = (Spell_Index - 1)
              • Set Spell_Loop = (Spell_Loop - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Spell_Index Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
              • Set Spell_Duration[Spell_Loop] = (Spell_Duration[Spell_Loop] + 0.10)
 
@ AKA.GywGod133
Pretty sure this should be - not +
  • Set Spell_Duration[Spell_Loop] = (Spell_Duration[Spell_Loop] + 0.10)
Also 0.03 seconds should be used for spells not 0.10

@Ergic
Yes that is MUI. But anything used twice or more should be stored into a variable and the variable should be used. This is for speed and efficiency.
Never use attacked unit use triggering unit.
The saving and loading from hashtable is not needed.
That trigger will also create an endless loop.
You need to first turn off that trigger, then deal damage, then turn on that trigger.
 
Level 4
Joined
Oct 6, 2009
Messages
85
  • UNT
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Incinerateer for (Attacking unit)) Not equal to 0
    • Actions
      • Hashtable - Save ((Load (Key (Attacking unit)) of (Key (Triggering unit)) from Hashdamage) + 10) as (Key (Attacking unit)) of (Key (Triggering unit)) in Hashdamage
      • Trigger - Turn off (This trigger)
      • Unit - Cause (Attacking unit) to damage (Triggering unit), dealing (Real((Load (Key (Attacking unit)) of (Key (Triggering unit)) from Hashdamage))) damage of attack type Chaos and damage type Normal
      • Quest - Display to (All players) the Quest Update message: ((String((Key (Attacking unit)))) + ( = + (String((Load (Key (Attacking unit)) of (Key (Triggering unit)) from Hashdamage)))))
      • Trigger - Turn on (This trigger)
i think all i need now is a damage detection thingy how do you guys make it?
 
Level 4
Joined
Oct 6, 2009
Messages
85
thanks guys it works now even works with cleave im posting my test map here so if other people in the future needs it they can just check it out
 

Attachments

  • Incinerate Not Orb.w3x
    42.2 KB · Views: 114
Status
Not open for further replies.
Top