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

[Spell] A bunch of spells, a bunch of problems

Status
Not open for further replies.
Level 3
Joined
Sep 7, 2013
Messages
40
So I've finally decided to learn triggering, and to do so I have a couple spells I want to create.

The first one is similar to Mana Burn. The difference is, it burns mana based upon the Intelligence of the caster. The actual spell reads as such:

Energic Blast - The Mage Hunter fires a bolt of energy which drains mana and deals damage based on her Intelligence. Leve 1 - 2 times Intelligence as damage and mana drain. Level 2 - 3 times Intelligence as damage and mana drain. Level 3 - 4 times Intelligence as damage and mana drain.

That's the first spell. The next one, which may not require triggers, is a teleport. Whereas a teleport scroll teleports a bunch of units to the target friendly building, I want to create a spell which teleports the caster to the target friendly unit or building.

Manifest - Teleports the Consecrated Eidolon to the target allied unit or building. This spell has a three second cast time.

I've tried playing around this one without triggers, but can't seem to get it to work.
______

Also, if anyone knows a good place to start learning triggers, that'd be much appreciated too :p
 
Level 23
Joined
Oct 20, 2012
Messages
3,075
I made a real quick trigger for your mana burn spell: (Dunno if it works yet, but it should according to my sleepless brain)

  • Mana Burn
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Mana Burn
    • Actions
      • Set VALUE = ((Real((Intelligence of (Triggering unit) (Include bonuses)))) x (1.00 + (Real((Level of Mana Burn for (Triggering unit))))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • VALUE Greater than (Mana of (Target unit of ability being cast))
        • Then - Actions
          • Set VALUE = (Mana of (Target unit of ability being cast))
        • Else - Actions
      • Unit - Set mana of (Target unit of ability being cast) to ((Mana of (Target unit of ability being cast)) - VALUE)
      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing VALUE damage of attack type Spells and damage type Normal
This deals damage and drains mana equal to the intelligence of the target times the level of ability plus 1 (Since your level 1 deals 2x the int). If the target's mana is less that the value (the multiplied int) then the trigger instead deals damage and burns mana equal to how much mana the target has left. If you want to add a drain, add this one to the trigger:
  • Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + VALUE)
Tutorials
There's a LOT of tutorials for you to learn GUI or JASS there. You can slowly learn by just referring to those tutorials whenever you need to.

This tut is probably the one I refer to most of the time: Things You Should Know When Using Triggers / GUI

EDIT: Adiktuz posted before I could post.

EDIT2: Added the drain this. Forgot. xP
 
Level 12
Joined
Nov 3, 2013
Messages
989
Energic Blast

  • Actions
    • Set User = Triggering Unit
    • Set Int1 = Intelligence of User (Include bonuses) * (Level of Energic Blast for User + 1)
    • Do damage here
    • Increase mana of User here
    • Decrease mana of target here

No offense but how could whoever that would get help from this not already know how to do it themselves? :grin:
 
I made a real quick trigger for your mana burn spell: (Dunno if it works yet, but it should according to my sleepless brain)

  • Mana Burn
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Mana Burn
    • Actions
      • Set VALUE = ((Real((Intelligence of (Triggering unit) (Include bonuses)))) x (1.00 + (Real((Level of Mana Burn for (Triggering unit))))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • VALUE Greater than (Mana of (Target unit of ability being cast))
        • Then - Actions
          • Set VALUE = (Mana of (Target unit of ability being cast))
        • Else - Actions
      • Unit - Set mana of (Target unit of ability being cast) to ((Mana of (Target unit of ability being cast)) - VALUE)
      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing VALUE damage of attack type Spells and damage type Normal
This deals damage and drains mana equal to the intelligence of the target times the level of ability plus 1 (Since your level 1 deals 2x the int). If the target's mana is less that the value (the multiplied int) then the trigger instead deals damage and burns mana equal to how much mana the target has left. If you want to add a drain, add this one to the trigger:
  • Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + VALUE)

Anything used twice or more should be stored in a variable and the variable should be used. Example: store (Target unit of ability being cast) in a unit variable and use the variable.
Also store triggering unit in a unit variable. This is for speed and efficiency.
 
Level 3
Joined
Sep 7, 2013
Messages
40
Well I've been working with triggers for a bit and I think I'm kind of understanding why things are working... so 100% improvement so far, yay!

What of the other spell, Manifest?

Manifest - Teleports the Consecrated Eidolon to the target allied unit or building. This spell has a three second cast time.
 
Status
Not open for further replies.
Top