Tutorial Basic of Triggered Spells

soul_reaper

New Member
Reaction score
12
This is my first tutorial in which I will teach some GUI users how to make triggered spells.

1- What is a triggered spell?
2- Dummies
3- Passives Abilities
4- Mass Abilities
5-Actives Ablities

1- What is a triggered spell?
A triggered spell is an ability that you can't just create in the Object Editor and require some triggers.For example, a blink spell that deal damage.
Many advanced spells makers use the "Channel" ability which is perfect for custom spells.But since this tutorial is for beginners, we will stick with normal abilities.

2- Dummies :
Dummies are unit with no model, no shadow, no attack and the "Locust" Abiltiy.They are used to cast some spells.They can also be used as the Spell's Missiles.
When you make a dummy, be sure that :

  • The Dummy has "Locust" Ability so we cannot select it.
  • The dummy has no model and no shadow (This isn't always necessary if for example you want iceballs that cast frost nova in a random location)
  • The dummy doesn't attack enemy units
Many spellmakers create new dummies everytime a triggered ability is casted, the only problem is that when a unit is created, it takes time for the trigger to work so, we will create a dummy at map init to run our triggers more smoothly
Create a dummy unit.Set
"Art-Animation-Blend Time
Art-Animation-Cast BackSwing
Art-Animation-Cast Point"
to 0.After that, name your unit "dummy" and do a trigger like mine
Trigger:
  • Init Dummy
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit - Create 1 Dummy for Neutral Passive at (Center of (Playable map area)) facing Default building facing degrees
      • Set Dummy = (Last created unit)

Let's start the most important part : Triggering

3- Passive Abilities :
To create triggered passive abilities, it's recommended to use evasion or critical strike with 0% chance.
We will create 2 type of Passive Ability to show you some examples :
1- Battle Thirst :
Gives 15% chance when attacking to increases the attack speed.

So, what are we going to do?
First make a Passive Ability based on evasion and set Data - Chance to Evade to 0%.Change the icon, description etc...
This ability will be the "dummy ability" which the only role is to be shown in the unit.

Second, Make another ability Based on Bloodlust.Set movespeed and scaling to 0 and change the attack to whatever you want, set Range to 99999.We will call it "Battle Thirst (Cast)"
Remember to set the manacost and cooldown to 0

Third, Make a trigger like this :
Trigger:
  • Battle Thirst
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Berserk
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to 20
        • Then - Actions
          • Unit - Add Battle Thirst (Cast) to Dummy
          • Unit - Order Dummy to Orc Shaman - Bloodlust (Attacking unit)
          • Unit - Remove Battle Thirst (Cast) from Dummy
        • Else - Actions


Congratulation!
You have made your first triggered spell :thup:

PS : You can change the attack speed of the bloodlust, make it increase movespeed or cause the unit bigger too.And edit the
Trigger:
  • If - Conditions
    • (Random integer number between 1 and 100) Greater than or equal to 15

To have more or less chance to trigger the spell.
You can also base the spell casted by the dummy with Unholy Frenzy, so the unit takes damage but has increased attack speed...Try practice yourself some triggering before I finsh the tutorial :D
Or even, if you're capable of doing this, make another spell different from this one. :)
 

Dest

New Member
Reaction score
26
Good luck with the tutorial. Make sure to add some pictures so it doesn't look dry. :)
 

Viikuna

No Marlo no game.
Reaction score
265
You should not create new dummies to cast bloodlust alla time. You can cast all bloodlusts and stormbolts with one dummy only, which can be created at map init.

Since creating units is so slow, this is something you want to do to make your triggers run more smoothly.
 

Viikuna

No Marlo no game.
Reaction score
265
It seems that most people have not. So long Ive been trying to teach that thing to people with so little succes.


Well, theres some succes. Jesus4Lyf did this cool DummyCaster script, which can be found from here: link

Its in Jass, but since that code does nothing but creates a one unit, you can just pretty much ignore it and read the theory behind that stuff and do it with GUI by yourself .
 

kaboo

New Member
Reaction score
45
You should not create new dummies to cast bloodlust alla time. You can cast all bloodlusts and stormbolts with one dummy only, which can be created at map init.

Since creating units is so slow, this is something you want to do to make your triggers run more smoothly.

this is what i see for first time but i wonder why i didnt get that idea never lol :D :thup: :thup:

What do you mean? :)
Never heard of that... :/

i think he wanted to say that when the map starts u create one dummy unit and store it to a variable (eg dummy unit) and then u order this unit to cast the spell
or u can just place the unit somewhere on the map and order this specific unit o cast it.
am i right?


@soul_reaper
1.why are you using this
Code:
Set Integer = (Random integer number between 1 and 100)
condition - Integer Less than or equal to 15

instead of this
Code:
condition - random integer number less than or equal to 15
-> no variable required here

--------------------------------------------------------------------------

2.why creating a dummy unit for each spell instead of using this
Code:
actions
-create dummy
-add ability to last created unit
-set level of ability
-add expiration timer
-order to cast
 

soul_reaper

New Member
Reaction score
12
It seems that most people have not. So long Ive been trying to teach that thing to people with so little succes.


Well, theres some succes. Jesus4Lyf did this cool DummyCaster script, which can be found from here: link

Its in Jass, but since that code does nothing but creates a one unit, you can just pretty much ignore it and read the theory behind that stuff and do it with GUI by yourself .
Ok let me explain something to you, too
Trigger:
  • Battle Thirst
    • Events
    • Unit - A unit Is attacked
    • Conditions
    • (Unit-type of (Attacking unit)) Equal to Troll Berserker
    • Actions
    • Set Integer = (Random integer number between 1 and 100)
    • Set Point = (Position of (Attacking unit))
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • Integer Less than or equal to 15
    • Then - Actions
    • Unit - Create 1 Dummy for (Owner of (Attacking unit)) at Point facing Default building facing degrees
    • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
    • Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Attacking unit)
    • Else - Actions
    • Custom script: call RemoveLocation (udg_Point)


Let say we add to this trigger :
Trigger:
  • Unit - Remove (Last created unit) from the game

It would look like this :
Trigger:
  • Battle Thirst
    • Events
    • Unit - A unit Is attacked
    • Conditions
    • (Unit-type of (Attacking unit)) Equal to Troll Berserker
    • Actions
    • Set Integer = (Random integer number between 1 and 100)
    • Set Point = (Position of (Attacking unit))
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • Integer Less than or equal to 15
    • Then - Actions
    • Unit - Create 1 Dummy for (Owner of (Attacking unit)) at Point facing Default building facing degrees
    • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
    • Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Attacking unit)
    • Unit - Remove (Last created unit) from the game
    • Else - Actions
    • Custom script: call RemoveLocation (udg_Point)

The spell, then will not be cast.
Same with :
Trigger:
  • Unit - Move Unit instantly to (Position of (Last created unit))

So, let say a player trigger the ability, the dummy is moved there and before casting the spell, the dummy is moved to another unit's position which has triggered the ability too.Which mean, not MUI :/

Hope I was clear enough :)

@soul_reaper
why are you using this
Code:
Set Integer = (Random integer number between 1 and 100)
condition - Integer Less than or equal to 15

instead of this
Code:
condition - random integer number less than or equal to 15
-> no variable required here

Gonne fix it :D
 

Viikuna

No Marlo no game.
Reaction score
265
So, let say a player trigger the ability, the dummy is moved there and before casting the spell, the dummy is moved to another unit's position which has triggered the ability too.Which mean, not MUI :/

Jass only runs one thread, which basicly means that it only does one thing at the time.

This means that its not possible that some other instance to move unit between some other instance moving it and giving it a cast order.
( Well, unless when moving unit you trigger some region event, which moves unit to some other spot, but that should not happen if you do your stuff properly, meaning: you dont make your region triggers to affect your dummy casters. )

edit. Im not sure if you understood what I said, but anyways, my point is that those spells can be done without creating new dummies all the time, and thats what you should teach to people.
 

soul_reaper

New Member
Reaction score
12
I'm not very familiar with JASS just the very very basic :)
Throught, I tried it now and in GUI it seems that it doesn't work.
Also, this tutorial is meant for beginners, not Jassers :)
 

Viikuna

No Marlo no game.
Reaction score
265
Well, you dont need Jass for this thing.
Its more like general mapping knowledge thingy.

Many good Jassers still use dummy casters in very bad way, and the same time one of my friends who does some really badly made GUI manages to use one dummy caster for all stuns in his map by using one dummy for casting all stormbolts.
 

kaboo

New Member
Reaction score
45
2.why creating a dummy unit for each spell instead of using this
Code:
actions
-create dummy
-add ability to last created unit
-set level of ability
-add expiration timer
-order to cast

thats it in GUI language i think
 

soul_reaper

New Member
Reaction score
12
thats it in GUI language i think
Viikuna is talking about another thing ^^
Well, you dont need Jass for this thing.
Its more like general mapping knowledge thingy.

Many good Jassers still use dummy casters in very bad way, and the same time one of my friends who does some really badly made GUI manages to use one dummy caster for all stuns in his map by using one dummy for casting all stormbolts.
Ok I may implements it in this tutorial but, throught, where did you know that Creating Unit is slow?
 

Viikuna

No Marlo no game.
Reaction score
265
CreateUnit is one of the slowest native functions, probably because units are the most comlex thingies in wc3, so game has to allocate a lot of memory for all that stuff.

Actually, I havent done any benchmarking myself. I just repeat what other people say, lols.

:D
 

soul_reaper

New Member
Reaction score
12
CreateUnit is one of the slowest native functions, probably because units are the most comlex thingies in wc3, so game has to allocate a lot of memory for all that stuff.

Actually, I havent done any benchmarking myself. I just repeat what other people say, lols.

:D

I think I know why people don't listen to you : it's because you have proof :/
 

Viikuna

No Marlo no game.
Reaction score
265
I think I know why people don't listen to you : it's because you have proof :/

Nice sentence.

Anyways, in this case I dont have to prove anything, because any of you can just try this in practice and see how it plays out.

Its like provng that Sun exists, by pointing your finger towards the sky.
 

BlackRose

Forum User
Reaction score
239
ONE DUMMY RULEZ. MULITPLE is fat. Although I do have some problems with one dummy only, when making illusions and then finding out casting position of the dummy, the dummy moves too fast! WUT?

But that is a different case, single dummy should be for stuns and novas or whatever.

It seems that most people have not. So long Ive been trying to teach that thing to people with so little succes.
ME BEEN TEACH---ED :)

(I think my intelligence has gone lower since this year o_O ^. My post is stupid lolz)
 
Reaction score
341
Jesus christ...

Listen to Vikuna, soul_reaper. Stop blowing off what he's saying because "this iz a a simple gUi tutorial". It's good practice, and as simple as creating a dummy unit at map init and setting it to a variable, that's all of like 2 lines. Vikuna is saying that creating units is slow, because the game has to load everything that goes along with the unit. Things such as abilities, health, mana ect.. (I hope you get the point).

As for the actual tutorial, drop the colors and use some simple bold or underlines to format the post. You also have some bad grammar in the tutorial. Now I'm not perfect with grammar, but some of the things you have in here are silly, like;

"Thanks to : Kaboo for some helps"
"The Dummy has "Locust" Ability so whe cannot select it."

I can understand if English isn't your native language, and if it is please read through your tutorial a few times, maybe even out loud before submitting.

Your tutorial also gets very off-topic when you start explaining leaks, simply link to a tutorial made specifically for them, rather than explaining one type of leak (locations). All in all, I don't think this is a very good tutorial. I mean aside from the spelling and getting off-track all your doing is showing some basic spells that you have made, and telling how to make them. What you should be doing is talking about good coding practices and efficient ways of doing things which are commonly done wrong in GUI. Things like a global dummy unit, or indexing.

That's just my two cents..
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top