• 🏆 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!

[Trigger] Making Hero, Some help with Spells

Status
Not open for further replies.
Level 2
Joined
Aug 4, 2010
Messages
11
K I've learnt how to make basic trigger enhancing spells so I'm not a complete newbie.

I just want a tactic on how I would make the spells, nothing too in depth as I will do the rest of the work. Just things like, what I should base it off, what dummy spells I should use and the main triggers.

The Skills:

Embargo
-Prevents Item and Spell use for a duration.

-I was thinking to base it off Doom and change targets to heroes. The doom would prevent the item use. Use Dummy unit to cast Soulburn on the target.

Immolation Shield
-Casts a Shield to give bonus armour and temporary Immolation for a Duration.

-I can't use lightening shield because no matter what the immolation would affect allies.
-Originally had the idea to use Inner Fire as the base spell and trigger the unit to 'add ability' immolation to the unit that has inner fire buff.
-This is difficult as the Immolation would in fact be permanent.
-So I need help on this spell the most.

Backstab
-Passive that mana flares any unit that uses a spell on the hero. Basically the Magic version of Thorns aura, but a passive not an Aura. Also grants magic resistance.

-Thinking to base it off Critical Strike
-Using chainlighting as a dummy spell, will set damages to equal a factor of the spell damage recieved, not sure if this messes with the magic resistance.
-Otherwise, is there a better more efficient way?

And Hell Followed
-Opens up a shimmering Portal from which spawns of hellish unit pour forth.

-I need it to be like pocket factory which I can rally.
-I don't have a clue of how to do a spell like this.
-3 different types of units must come out of the portal, not one type.

Any help is appreciated. I'm not asking to be spoonfed, just the tactic of how I would go about creating the spells. The types of triggers needed and preferably 'why' I need said trigger.

Thank you in advance.
 
For the immolation, you can remove the spell after the inner fire finishes...

For backstab, it will be better to just trigger the custom damage and just use chain lightning for the lightning effect...

For the hell followed, you can just make a "Dummy" building which can have rally points and then just trigger the character creation...
 
Level 17
Joined
Jun 17, 2010
Messages
2,275
Edit: Oh i didnt read it completely. For most of those spells you dont need any triggering. Very simple. Embargo just use doom, remove damage and everything, then change the target model to what you want. This is probly set with a buff so edit the buff or make one by urself.
 
Level 2
Joined
Aug 4, 2010
Messages
11
The backstab is easy, I just need to know if there is a trigger such as 'A Unit is Attack by Spell' it should be magical.

For the immolation shield, I've just been trying to do it. I'm writing a trigger for the immolation but I cannot find an Event like 'A Unit is Affected by Ability' ect ect. I was thinking to add separate expiration timers on each level of the Shield for the immolation. Then the immolation can be removed. The base spell is 'Flame Shield'. Dummy spell is 'Dummy Inner Fire'. Trying to write a trigger that gives permanent immolation to any unit which has Flame Shield but expires it after a period. How to do this?

As for Hell Follows, so I just choose a barracks, change model? Ok fair enough. I guess it shouldn't be too hard to write a trigger to spawn units from it? Thanks for the Embargo spell.

Thank you, will give rep soon! Please answer more questions :)
 
The backstab is easy, I just need to know if there is a trigger such as 'A Unit is Attack by Spell' it should be magical.

For the immolation shield, I've just been trying to do it. I'm writing a trigger for the immolation but I cannot find an Event like 'A Unit is Affected by Ability' ect ect. I was thinking to add separate expiration timers on each level of the Shield for the immolation. Then the immolation can be removed. The base spell is 'Flame Shield'. Dummy spell is 'Dummy Inner Fire'. Trying to write a trigger that gives permanent immolation to any unit which has Flame Shield but expires it after a period. How to do this?

As for Hell Follows, so I just choose a barracks, change model? Ok fair enough. I guess it shouldn't be too hard to write a trigger to spawn units from it? Thanks for the Embargo spell.

Thank you, will give rep soon! Please answer more questions :)

For the first one, you can just use, a unit starts the effect of an ability and use Unit - TargetOfAbilityBeingCast for the unit that will get backstabbed

  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
  • Actions
    • If-then-else Multiple Actions
      • If - Conditions
        • Level of Backstab for TargetUnitOfAbilityBeingCast is greater than 0
      • Then - Actions
        • //Add whatever actions you want
        • //Example
        • Unit - Cause TargetUnitOfAbilityBeingCast to deal X damage to TriggeringUnit

For the immolation, you can create a periodic event which checks if a unit has the innerfire buff or whatever dummy buff ur using and if not, remove the immolation...



  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • Ability Being cast is equal to InnerFireDummy (The inner fire spell that you cast on the unit)
  • Actions
    • Unit Group - Add TargetUnitOfabilityBeingCast to ImmolationGroup
    • Unit - Add Immolation to TargetUnitOfAbilityBeingCast
    • Unit - Set Level of Immolation for TargetUnitOfAbilityBeingCast to Level of InnerFireDummy of TUOABC


  • Events
    • Timer - Every .03 seconds of Game-time
  • Actions
    • Unit Group - Pick every unit in ImmolationGroup and do
      • Actions
        • If-then-else
          • If-Conditions
            • PickedUnit has buff (InnerFireBuff) equal to false
          • Then-Actions
            • Unit - Remove Immolation from PickedUnit

 
Level 2
Joined
Aug 4, 2010
Messages
11
Ah this looks good actually, I will try this Immolation now. But what do you mean by Immolation Group? It's not supposed to give immolation to a group of units, just autocast on one unit at a time.
 
Ah this looks good actually, I will try this Immolation now. But what do you mean by Immolation Group? It's not supposed to give immolation to a group of units, just autocast on one unit at a time.

you add the unit that gets the immolation to a unit group that will hold every unit that has the immolation so that it will be easy to loop through them...
 
Level 19
Joined
Feb 4, 2009
Messages
1,313
  • LightningShield Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Inner Fire
    • Actions
      • Unit Group - Add (Target unit of ability being cast) to LS_Group
  • LightningShield Loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • -------- Area of effect --------
      • Set r = 200.00
      • Unit Group - Pick every unit in LS_Group and do (Actions)
        • Loop - Actions
          • Set u = (Picked unit)
          • -------- Check Buff here --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (u has buff Lightning Shield) Equal to True
            • Then - Actions
              • Custom script: set udg_x = GetUnitX(udg_u)
              • Custom script: set udg_y = GetUnitY(udg_u)
              • Custom script: call GroupEnumUnitsInRange(udg_g, udg_x, udg_y, udg_r, null)
              • -------- Change valid targets here --------
              • Unit Group - Pick every unit in g and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) is A structure) Equal to False
                      • ((Picked unit) is A flying unit) Equal to False
                      • ((Picked unit) is Mechanical) Equal to False
                      • ((Picked unit) is Magic Immune) Equal to False
                      • ((Picked unit) belongs to an enemy of (Owner of u)) Equal to True
                    • Then - Actions
                      • -------- Damage per second --------
                      • Unit - Cause u to damage (Picked unit), dealing 20.00 damage of attack type Spells and damage type Normal
                      • -------- Effect --------
                      • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Orc\LightningShield\LightningShieldBuff.mdl
                      • Special Effect - Destroy (Last created special effect)
                    • Else - Actions
            • Else - Actions
              • Unit Group - Remove u from LS_Group
 

Attachments

  • Lightning Shield.w3x
    14.9 KB · Views: 60
Level 2
Joined
Aug 4, 2010
Messages
11
I got the Embargo and the Lightening Shield working (I changed the buffs from Lightening Shield to Immolation).

Still don't have a clue on how to do the Portal.

As for Backstab, I'm going to base it off Crit Strike and use Chain Lightening (lightening effect as Mana Flare), to (Orc Farseer Chainlightening anything that casts a negative ability on the hero). However, how do I put in the Magic Resistance too? Such as 50% spell reduction? The dummy unit will cast the lightening, is it possible to set damage to equal the damage caused by the negative spell?

Infinate Answers, sorry but his version of Shield was better :/

Edit:

Your portal spell is not what I want either.. Remember the Human Campaign of TFT, and how Illidan had to close those portals? Imagine one of those in your control, units pouring out and you can rally them too. They are summons, but they can live until they are killed.
 
I got the Embargo and the Lightening Shield working (I changed the buffs from Lightening Shield to Immolation).

Still don't have a clue on how to do the Portal.

As for Backstab, I'm going to base it off Crit Strike and use Chain Lightening (lightening effect as Mana Flare), to (Orc Farseer Chainlightening anything that casts a negative ability on the hero). However, how do I put in the Magic Resistance too? Such as 50% spell reduction? The dummy unit will cast the lightening, is it possible to set damage to equal the damage caused by the negative spell?

Infinate Answers, sorry but his version of Shield was better :/

Edit:

Your portal spell is not what I want either.. Remember the Human Campaign of TFT, and how Illidan had to close those portals? Imagine one of those in your control, units pouring out and you can rally them too. They are summons, but they can live until they are killed.

Use the attack type magic for the triggered damage so that the damage will get naturally reduced by magic reducing abilities...

hmmm... if you want the damage to be equal to the damage of the negative spell, it would be hard because you cannot effectively use a damage detection trigger for this unless you know how to get attack type of damage taken...
 
All you would need is to store the damage, spell, and target in variables.
Oh yes, there's an easier way, I nearly forgot... ^^

of course you can store every damage from ALL SPELLS in the map that can target the hero but then you would need extra effort in considering spell damage reduction... though this I think is a LOT easier than using a DDS...

Example:

  • Events
    • Map Initialization
  • Actions
    • ----For Impale----
    • Set SPELLDAMAGE[0] = 100
    • Set SPELLDAMAGE[1] = 200
    • Set SPELLDAMAGE[2] = 300
    • ----For StormBolt----
    • Set SPELLDAMAGE[0] = 125
    • Set SPELLDAMAGE[1] = 200
    • Set SPELLDAMAGE[2] = 275
    • and so on...
then just recall the variables depending on what spell is used, I would prefer one variable array for all spells, you'll just need to remember what variable is for what level of spell used, to make sure you remember, you can add comments after every set of variables just like above... you just need to add some extra calculations to consider spell damage reduction of your hero...

you need to it this way since you cannot get damage taken via a direct action from the event Unit - A Unit starts the effect of an ability...
 
Theres an easier way lol
  • Set SpellDamage[0] = (level of impale for (unit) x 100
  • Set SpellDamage[1] = 50 + ((level of stormbolt for (unit) x 75)

well with this method each specific variable will be set in the trigger of the spell it corresponds to since you need to have a unit event to use these actions ,and mine is used at the start of the game, its up to him which method to use...

PROS of yours: less number of slots in an array used though I guess it doesnt really matter since every array is always made of 8190 slots...

PROS of mine: a little bit more "organized" since you set all variables at only one trigger...
 
Level 17
Joined
Jun 17, 2010
Messages
2,275
Nope ur wrong yet again, the unit can be set earlier in the game as a variable. I do this for most of my maps because it saves ALOT of time. Like if its an rpg, the tavern region the unit gets teleported from make variables stating Set Unit = Triggering unit so in my idea u can just say unit as the variable
 
Nope ur wrong yet again, the unit can be set earlier in the game as a variable. I do this for most of my maps because it saves ALOT of time. Like if its an rpg, the tavern region the unit gets teleported from make variables stating Set Unit = Triggering unit so in my idea u can just say unit as the variable

you need to save every unit that can cast spells on his hero and also the spell levels can change thru time... Its not his hero that you will need to save but all other units that can cast a damaging spell to his hero... So if you save all units/heroes at the start of the game, then you'll need to loop thru them in order to get the right unit for every spell casted...

A good example of what he is trying to accomplish I think is Razor's third skill from DotA... just a modified version of it which instead of a fixed damage per level you damage the enemy equal to the damage of the spell he casts...

anyway, even if you save the units/heroes in the start of the game, you still need to get the damage amount for every instance of a spell cast since spell levels changes thru time specially for heroes, so you would need to use the Set variable for every spell casted... and also there can be a problem with your formula if some of his spells doesnt have a formula (eg. really randomized damage per level)...
 
Last edited:
hm,
Unit - unit casts a spell
Conditon - target unit has spell
Event - Add event unit - target of ability being cast gets damaged
====Second trigger=====
Event -
Action - damage casting unit for damage done to target of ability

Haha just thought of it.

could leak since you cannot remove event, could bug if you destroy trigger and also it will work even when you normal attack the unit once the event has registered...

after thinking about your last post, I thought of an easy way to do this with only 1 trigger and just a few variables

  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • Level of Backstab for TargetUnitOfAbilityBeingCast is greater than 0
  • Actions
    • Set Ability = Ability being cast //To minimize function calls
    • Set UNIT = TargetUnitOfAbilityBeingCast
    • If Ability is equal to Storm Bolt then do Set SPELLDAMAGE = 100x(LevelOfStormBolt for Triggering unit) -> formula of spell damage
    • // Add more of this statements for all targetable spells that can be used against your hero
    • --------Add the desired actions after this line--------
    • Unit - Create 1 Dummy for OwnerOfUNIT blahblah
    • Set Dummy = Last Created Unit
    • Unit - Add a 1.00 second generic expiration timer to Dummy
    • Unit - Add ChainLightningDummy to Dummy
    • Unit - Order Dummy to ChainLightning TriggeringUnit
    • Unit - Make UNIT deal SPELLDAMAGE damage to TriggeringUnit of attacktype Chaos and Damage type Divine
To account for natural spell reduction of your hero you can multiply the SPELLDAMAGE by the damage factor of spell-type attacks for hero-type armor or whatever armor your unit has which can be found in the gameplay constants...

also note that the damage done by this trigger is not affected by the casting hero's armor or spell reduction since it is of damage-type Divine
 
Level 9
Joined
Jun 25, 2009
Messages
427
Gosh, why are you thinking about this in the very HARD way.
  • Backstab
    • Events:
      • Unit - Unit learns a skill
    • Conditions:
      • (Hero Learned Skill) equal to Backstab
    • Actions:
      • Unit - Remove BStab_Dummy from the game
      • Set Hero_Pos=(Position of (Triggering Unit))
      • Unit - Create Bstab Dummy for (Owner of (Triggering Unit)) at Hero_Pos facing Default building facing degrees
      • Unit - Set the level of BStab Dummy for (Last Created Unit) to level of Backstab for (Triggering Unit)
      • Unit - Add 9999 seconds Generic expiration timer to (Last Created Unit)
      • Set Hero=(Triggering Unit)
      • Set BStab_Dummy=(Last Created Unit)
      • Trigger - Turn On Backstab Loop <gen>
      • Unit - Order (Last Created Unit) to Night Elf Faerie Dragon - Mana Flare
      • Custom script: call RemoveLocation(udg_Hero_Pos)
  • Backstab Loop
    • Events:
      • Time - Every 0.04 seconds of the game
    • Conditions:
    • Actions:
      • If (All Conditions) are True then (Do Actions) else (Do Actions)
        • If - Conditions:
          • (Bstab_Dummy) is Dead
        • Then - Actions:
          • Unit - Remove BStab_Dummy from the game
          • Set Hero_Pos=(Position of (Hero))
          • Unit - Create Bstab Dummy for (Owner of (Hero)) at Hero_Pos facing Default building facing degrees
          • Unit - Set the level of BStab Dummy for (Last Created Unit) to level of Backstab for (Hero)
          • Unit - Add 9999 seconds Generic expiration timer to (Last Created Unit)
          • Set BStab_Dummy=(Last Created Unit)
          • Unit - Order (Last Created Unit) Night Elf Faerie Dragon - Mana Flare
          • Custom script: call RemoveLocation(udg_Hero_Pos)
        • Else - Actions:
          • Set Hero_Pos_2=(Position of (Hero))
          • Unit - Move (Bstab_Dummy) to Hero_Pos_2
          • Custom script: call RemoveLocation(udg_Hero_Pos_2)
I might have forgotten something, but this should absolutely work! :)
 
Gosh, why are you thinking about this in the very HARD way.
  • Backstab
    • Events:
      • Unit - Unit learns a skill
    • Conditions:
      • (Hero Learned Skill) equal to Backstab
    • Actions:
      • Unit - Remove BStab_Dummy from the game
      • Set Hero_Pos=(Position of (Triggering Unit))
      • Unit - Create Bstab Dummy for (Owner of (Triggering Unit)) at Hero_Pos facing Default building facing degrees
      • Unit - Set the level of BStab Dummy for (Last Created Unit) to level of Backstab for (Triggering Unit)
      • Unit - Add 9999 seconds Generic expiration timer to (Last Created Unit)
      • Set Hero=(Triggering Unit)
      • Set BStab_Dummy=(Last Created Unit)
      • Trigger - Turn On Backstab Loop <gen>
      • Unit - Order (Last Created Unit) to Night Elf Faerie Dragon - Mana Flare
      • Custom script: call RemoveLocation(udg_Hero_Pos)
  • Backstab Loop
    • Events:
      • Time - Every 0.04 seconds of the game
    • Conditions:
    • Actions:
      • If (All Conditions) are True then (Do Actions) else (Do Actions)
        • If - Conditions:
          • (Bstab_Dummy) is Dead
        • Then - Actions:
          • Unit - Remove BStab_Dummy from the game
          • Set Hero_Pos=(Position of (Hero))
          • Unit - Create Bstab Dummy for (Owner of (Hero)) at Hero_Pos facing Default building facing degrees
          • Unit - Set the level of BStab Dummy for (Last Created Unit) to level of Backstab for (Hero)
          • Unit - Add 9999 seconds Generic expiration timer to (Last Created Unit)
          • Set BStab_Dummy=(Last Created Unit)
          • Unit - Order (Last Created Unit) Night Elf Faerie Dragon - Mana Flare
          • Custom script: call RemoveLocation(udg_Hero_Pos)
        • Else - Actions:
          • Set Hero_Pos_2=(Position of (Hero))
          • Unit - Move (Bstab_Dummy) to Hero_Pos_2
          • Custom script: call RemoveLocation(udg_Hero_Pos_2)
I might have forgotten something, but this should absolutely work! :)

well, first of all you cannot use a default mana flare since he wants the damage of the flare to be equal the damage of the spell casted on his hero...

also, your trigger isnt MUI nor MPI... at least if he wanted to have several heroes with the backstab my trigger wont bug and yours will bug...

also, since its always looping, even if the hero is stagnant, the trigger still runs so even by a very little amount it reduces computing power... ^^... and yours will only deal a fixed amount of damage per level since it just uses a modified mana flare skill...
 
Status
Not open for further replies.
Top