Tutorial Basic of Triggered Spells

soul_reaper

New Member
Reaction score
12
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).
I understand that creating unit is slow, but using 1 dummy result in non-MUI because if 2 units trigger the event in the same time, only one would cast the spel correctly.
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.
Sorry for the bad english.I would do what you say and try to correct mistakes
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..
Not sure if I really go off-topic it's just that many spellmakers have leaks in their trigger.I may implement some tips for spellmaking, throught the only one I made is about
Trigger:
  • Unit begin casting an ability
and
Trigger:
  • Unit starts the effect of an ability


Thank for being harsh :D
It's my first tutorial, some comments like this one are welcome :thup:
 

BRUTAL

I'm working
Reaction score
118
but using 1 dummy result in non-MUI because if 2 units trigger the event in the same time, only one would cast the spel correctly.
Well thats because you are doing it wrong.
You have to set the dummy units swing animation and that crap to 0, so it casts spells instantly.
Read and see how its done. http://www.thehelper.net/forums/showthread.php?t=132696
http://www.thehelper.net/forums/showthread.php?t=131009&page=2
http://www.thehelper.net/forums/showpost.php?p=1045479&postcount=23
 

BRUTAL

I'm working
Reaction score
118
Object editor.
These fields are like at the top.
"Art-Animation-Blend Time
Art-Animation-Cast BackSwing
Art-Animation-Cast Point"

Set them to 0.
 
Reaction score
341
I understand that creating unit is slow, but using 1 dummy result in non-MUI because if 2 units trigger the event in the same time, only one would cast the spel correctly.

What part of one thread didn't you understand? You should probably test it out for yourself, because it's used very much in the vJass community, not sure about how many GUI'ers use it. And if you test it, and it does not work post what you did because you most likely did it wrong.
 

soul_reaper

New Member
Reaction score
12
Here you are.It's a spell made in my map, modified a litlle with one dummy and a
Trigger:
  • Unit - Move Dummy instantly to (Random point in (Playable map area))
 

Attachments

  • Spell.w3x
    19.1 KB · Views: 233

BRUTAL

I'm working
Reaction score
118
Here you go sir.

Just some things to note:
Trigger:
  • Ghoul Frenzy
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Ghoul
    • 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 - Move Dummy instantly to (Position of (Attacking unit))
          • Unit - Change ownership of Dummy to (Owner of (Attacking unit)) and Change color
          • Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Attacking unit)
          • Unit - Move Dummy instantly to (Random point in (Playable map area))
        • Else - Actions

Why do you need to move the dummy to the position of the attacking unit? Its stupid and requires more lines; why not just set the range of the spell to a high value?
You don't need to change the ownership of the dummy; again this just requires an extra line.
And you order (Last created unit) to cast the spell, that needed to be changed to the variable Dummy.
Why do you move the dummy to a random point at the end? The dummy never needs to move whatsoever really.

Trigger:
  • Ghoul Frenzy Copy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Casting unit) Equal to Dummy
    • Actions
      • Unit - Change ownership of Dummy to Neutral Victim and Change color

^All of that is useless.

Trigger:
  • Untitled Trigger 001
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit - Create 1 Dummy for Neutral Victim at (Center of (Playable map area)) facing Default building facing degrees
      • Set Dummy = (Last created unit)

For creating the dummy use neutral passive.

Now for your dummy unit.
You gave it the invulnerable ability. Not needed; when a unit has locust nothing can hurt it or anything.
You didn't remove the units shadow, you should do that for aesthetic purposes.
You didn't remove the ability for the dummy to attack. Well since the dummy belongs to passive; it makes no difference, but if the dummy was for a player, the dummy could attack enemies. But if you ever are going to do so, find this line in object editor "Combat-Attacks enabled" and set it to none.
Again if the dummy belongs to a player, remove its food cost and sound set.

For your spell;
Remove the cooldown, and set the range to a high value. Also change the targets allowed like i did. (Though I'm not sure if that was necessary :p)
 

Attachments

  • Spell.w3x
    18.7 KB · Views: 263

soul_reaper

New Member
Reaction score
12
Here you go sir.

Just some things to note:
Trigger:
  • Ghoul Frenzy
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Ghoul
    • 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 - Move Dummy instantly to (Position of (Attacking unit))
          • Unit - Change ownership of Dummy to (Owner of (Attacking unit)) and Change color
          • Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Attacking unit)
          • Unit - Move Dummy instantly to (Random point in (Playable map area))
        • Else - Actions

Why do you need to move the dummy to the position of the attacking unit?
Its stupid and requires more lines; why not just set the range of the spell to a high value?
You don't need to change the ownership of the dummy; again this just requires an extra line.
Why do you move the dummy to a random point at the end? The dummy nevers needs to move whatsoever really.

Trigger:
  • Ghoul Frenzy Copy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Casting unit) Equal to Dummy
    • Actions
      • Unit - Change ownership of Dummy to Neutral Victim and Change color

^All of that is useless.

Trigger:
  • Untitled Trigger 001
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit - Create 1 Dummy for Neutral Victim at (Center of (Playable map area)) facing Default building facing degrees
      • Set Dummy = (Last created unit)

For creating the dummy use neutral passive.

Now for your dummy unit.
You gave it the invulnerable ability. Not needed; when a unit has locust nothing can hurt it or anything.
You didn't remove the units shadow, you should do that for aesthetic purposes.
You didn't remove the ability for the dummy to attack. Well since the dummy belongs to passive; it makes no difference, but if the dummy was for a player, the dummy could attack enemies.
Again if the dummy belongs to a player, remove its food cost and sound set.

For your spell;
Remove the cooldown, and set the range to a high value. Also change the targets allowed like i did. (Though I'm not sure if that was necessary :p)

To reply to all your question, I don't know :p
I made the trigger fastly so... :)
 

BRUTAL

I'm working
Reaction score
118
Well now you know; its very possible to use one dummy for casting spells. :thup:
 

Moridin

Snow Leopard
Reaction score
144
Note that not all dummies can be replaced by a single dummy.
I admit that I normally create dummies and destroy them quite a bit....and now I realise that's quite innefficient, but if you're using a dummy for a missile, etc (something other than casting a spell) then I'm pretty sure you would need more than 1 dummy.

Also...I think it's better to move the dummy rather than set the range of the spell to 99999. This is mainly because some spells depend on the angle at which it is cast, distance from caster to target, etc.
 

BRUTAL

I'm working
Reaction score
118
>Note that not all dummies can be replaced by a single dummy.

Of course not. But all dummy CASTERS, can; if the spells and dummy are configured right.

>but if you're using a dummy for a missile, etc (something other than casting a spell) then I'm pretty sure you would need more than 1 dummy.

Well duh that's just common sense. The point of this wasn't to say you can replace every created dummy in a map with one global dummy. Obviously you need to create a new dummy when it is being used as an effect.
But we are talking about dummy casters, not dummy effects.

>Also...I think it's better to move the dummy rather than set the range of the spell to 99999. This is mainly because some spells depend on the angle at which it is cast, distance from caster to target, etc.

I don't.
There are no spells built into warcraft that vary based on angle or distance.
I believe you are talking about triggered abilities. Though, I've never heard of a dummy using a triggered ability, I've never had a dummy use a triggered spell anyways. o_O
Dummies don't use triggered spells, they just assist in the effects. At least that is how I see it.
 

Viikuna

No Marlo no game.
Reaction score
265
Well, IMO theres really no sense in trying to use only one dummy for everything either...

Its just that when you can actually easily avoid creating new unit, when its not really needed, thats when you should absolutely and surely do it.
 

soul_reaper

New Member
Reaction score
12
I will re-make the tut next week-end (School :()
Just edited the first part, which talks about Global Dummy trick :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top