• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Basics of The World Editor

Level 22
Joined
Jun 24, 2008
Messages
3,050
Greeting, im TheBlooddancer.
This tutorial is an attempt to learn anyone, who got a topic they do not know about, something.

If there is more Topics than the ones im Telling, you should post it, and ill include it into this Thread.

Things written in This color, is to be talked about later on.

Attention!
If your not ALL-NEW to the World Editor, you should search other tutorials.

Ok, lets get Started:

For trigger "reading" ill colour Events Red, Conditions Green and Actions Grey

Triggers, atleast the GUI (Graphical User Interface) version of Triggers, is build by these functions:
  • Trigger Title
    • Events
    • Conditions
    • Actions
An Event is "If this happens"
A Conditions is "If this is True/False"
An Action is "Then this will happen"

(Note) There can be multiple Events, conditions and Actions.

When making a Trigger you should "build up a sentence".
Like- If i wanted when a footman died, there would be created another unit, of the type, of the dying unit i would build up a trigger like this:
  • Res Trigger
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • Unit - Create 1 (Unit-type of (Triggering unit)) for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing (Facing of (Triggering unit)) degrees
Now, im going to read my Trigger through:
When a unit dies, and if the dying unit is a footman, then create 1 of the dying unit, at the position of the dying unit, facing the same angle of the dying unit.

Be aware, that that trigger leaks. You might wanna check that topic later.

The reason, i say the dying unit, instead of triggering unit, is that the unit triggering the event, is a unit that dies.
(Trigging unit/player) will allways refer to the unit/player that "starts" the trigger.

Remember this is just an example.
Triggers can be used for allmost anything.- Spells also!
But for Spell Triggers you need a Spell, and sometimes a Dummy-unit or a Dummy-spell

Lets make a Triggered Spell also.
Im going to start making a Spell based on Warstomp (You can use Channel to, but Warstomp makes it easier for New users)

Ill modify the Warstomp to deal no damage, and not stunning.
Also i am removing all the buffs.
Uncheck all options in "Level 1 - Stats - Targets Allowed"
This means that the Spell wont do anything, but costing mana, and such.

Now i will continue on the Next chapter- Dummy-Units and Dummy-Spells

Hi again!
In this Chapter i will teach you About Dummy-Units and Dummy-Spells.
For thoose of you that do not know, a Dummy is something like the things you hit on in Boxing, when its not a human ofcourse :grin:

But in Warcraft a Dummy-Unit is something that causes the action, but isnt the real "caster", in this case.

Now i will continue on my Triggered Spell.
This spell will be something like, casting- and then 6 Flamestrikes will be casted around the Caster.

I allready got my "Hero-Spell". I call the "real" spell, the one you click on, a "Hero-Spell" Because, this is the spell that you think that you use.
But in reality when you use a Dummy focused spell, you create some invisible unit, casting the real magic. This will be the "Dummy-Spell".

Ill start by creating my Dummy-Spell, based on Flamestrike, and changing whatever i want on it, to fit my spell.- Remember to set "Hero ability" and Item Ability" to False.
Perhaps im going to change the Flames with Spikes? Ill think ill do that :wink:

So what im doing is changing all the model files, also on all of the buffs, or effects, to fit my Spikes.
If there is something you find ugly, or unnecesary, just delete it.
Remember to set mana cost to 0!

Next, create the Dummy-Unit.
Ill copy a footman, and changing his "Art - Model" file to something Extraordinary!
Click the "Custom" and change the text to ".mdl" and press OK.
This will cause the Unit to be invisible, even to you!- Simply beacause it has no model.
Remember to set its shadow to "none". Else you will have just a shadow floating in the middle of nowhere.
-Now give it the Dummy-Spell we've created earlier.

Warning:

Dummy-Units should allways have Collision Size 0 and be Flying Units, in the height 0.-
Either that, or give it the skill Locust! (You should do that anyways)

Ofcourse, i need a Casting unit to. But you'll have to change that as you need.

Now i will continue, again, in next chapter: Using Dummies together with triggers!


Welcome to the Final part of Triggered Spells.

To start of with this spell you Need:

  • A Dummy Unit
  • A Dummy Spell
  • and a Casting Unit
To see how ive made theese, check the upper points.

When you got all theese you will have to make the Trigger!
-I have called my "Hero-Spell" for "Circle Spikes" and added an editor Suffix named "Hero-Spell"
  • Circle Spikes
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Circle Spikes "Hero-Spell"
    • Actions
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at ((Position of (Triggering unit)) offset by 200.00 towards (60.00 x (Real((Integer A)))) degrees) facing Default building facing degrees
          • Unit - Order (Last created unit) to Human Blood Mage - Flame Strike (Position of (Last created unit))
          • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
Again, i am going to read this for you:

When a unit start the effect of a spell, and that spell is "Circle Spikes" then create value 1-12 (12) Dummies for the Owner of the caster, at the position of the caster, with an offset of 200 (200 away from the caster) in the direction 60 x 12 facing their normal facing direction (down).
Then make the last created unit (our dummy) to cast Flame Strike (thats our base ability) at the position of last created unit (at the dummy).
Then make the unit "die" in 0.5 seconds after that.

If you can understand this, then you got a fairly big ammount of knowledge on Triggers.
Integer- Number (Whole number, such as 1, 203, -126)
Offset- Leap from a point
Generic- Same for all
Facing- The way something "looks" or is turned against


A Variable is something that can (remember, can) change during the game, if youve made such.
But Variables (Or the lack of) are also thous that creates most Memory Leaks (Known as Leaks)
If i should explain everything about Variables, this would be an all new tutorial. If you want to know more about Variables, search on TheHive.

Variables are still kept even when the trigger ends. (In GUI. Just to note it, thoose variables are known as 'Globals')
If i create a trigger containing "set variable" this variable is set forever.- untill you replace it with something new, clears, or deletes it..
Like this:

  • Variable Trigger
    • Events
      • Unit - A unit Starts the effect of an ability
      • Conditions
        • (Ability being cast) Equal to "Something"
      • Actions
        • Set "Your Variable Name = (Casting Unit)
This line, will be needed if you have to make 2 triggers for one spell.- Then you need to make the game "remember" the casting unit, in the form of a variable.

But this spell, would only work for one player at a time.
Ex: I a unit owned by Red cast this, and its a channeling ability (an ability taking either time to cast, or time to finish the effect of), then it would stop when a unit owned by Blue casted it. Because then the game will set Blue's unit to be the Caster, and forget about Red's.

To Solve this, then you need an Array- which is a "[]" after the Variable Name.
In this box, you are able to write several things:
To solve the above problem, you could do:

  • Variable Trigger
    • Events
      • Unit - A unit Starts the effect of an ability
      • Conditions
        • (Ability being cast) Equal to "Something"
      • Actions
        • Set "Your Variable Name"[(Player number of (Owner of (Triggering unit)))] = (Casting unit)
You can change [(Player number of (Owner of (Triggering unit)))] to
-------------------[(Player number of (Triggering player))]


This will make up to 12 variables out of this one!
Example, if the caster was Red, then the Variable would be Called "Your Variable Name[1]"
And if the Caster was Blue, then it would be "Your Variable Name[2]".
You see it?
Then there would be a different Variable for each player in use!

This still doesnt Support multiple Units, owned by one player, tough.
That is known as MUI (Multi Unit Instanceable)
I belive this is Easiest to do in JASS.

Memory Leaks, or Leaks, is when Warcraft remembers something, its supposed not to. Or actually, we just forgot to clean it.
Example:
When i create a unit at a position of 'casting unit' or such, Warcraft creates a location for that point, creates the unit, and goes on.
This point is a Leak. Its not removed, and will take space, untill.
To remove a point we would do this:

  • Save the point into a variable.
  • Replace 'Position of (..)' With our variable.
  • Clear the variable by using a custom script (JASS).
Do this:
  • Actions
    • Custom Script: call RemoveLocation(udg_NameOfVariable)
Now, the point is removed, and can't be accessed more. So if you create something more down in your trigger, you can't. The point is removed.
But you can allways set the variable again, ofcourse.

(Note) Allways remove locations etc, at the far buttom of the code.

____________________________________________________________________________________________________________
Locust is an ability that is added to the small flies that comes out when you cast Crypt Lord's "Locust Swarm".
This ability, named afer the flies, makes the flies "un-click-able"- which means you cannot select them. This is usefull for making unit looking like effects. A locusted unit cannot take damage, and will allways have the Collusion size 0.
Therefor its a good idea to add Locust to any Dummy unit, even if it doesnt need a model-file.


GUI is the "Pick-to-select" way of doing Triggers.
It is known as the "normal" way of doing triggers.
Its the short of Graphical User Interface.

JASS is another way of making triggers.
Triggers made in JASS is written, either in Custom script-snippits, or in documents.
I am not used to JASS, and can therefor not help you there.
If you want JASS tutorials, search on TheHive for them.

Doodads are "locusted" (Un-click-able) things which can be placed almost everywhere on the map.
To create a proper terrain, you should allways use a bunch of doodads to create the right enviromental feeling.
But if you use to many Doodads at one place, be sure to also set some pathing blockers, so that units cant walk straight through them.
Would look wierd to have an army marching through a large rock :hohum:
Doodads is just a normal part of the WE (World Editor) But if you like to create terrains, be sure to have downloadet the UTM (Ultimate Terraining Map)- found at TheHive.
If you want to create your own form for Doodads, or give you game a special touch, i would advice you to locust some units (Buildings, ruins, ships)- and if they should move, simply create a trigger saying
  • Making Ships Patrol
    • Events
      • Time - Every 20.00 Seconds of game time
    • Conditions
    • Actions
      • UnitGroup - Order every unit in (Units of Type (Ship) to Patrol to (Random point in (All of Playable Map area)
Things like this is very usefull in RPG's to make the player feel that its a "pro" map.

Also you should use nice Aestethics for "serious" games.
Search on the hive for a Great tutorial about that.


Please, somebody, Comment it, and give a review.

Mods! Do not judge it yet, this is not Finished!
 
Last edited:
Level 17
Joined
Jun 12, 2007
Messages
1,261
Oke I'll take a good look today! ^^

Trigger Section:
- You need to clean up the leaks, for example inside the ressurection example.
- There is already a tutorial that explains what every trigger does here so the trigger section does not have enough information.
- This tutorial also explains the basics about triggers.

Dummy Units and Dummy Spells
- I might have learned a bit from what u told here there is already a tutorial explaining this subject way better, this tutorial can be found here.

Combining Triggers, and Dummies
- This has the same subject as the previous section, and the tutorial linked above also explains it.

Variables
- Variables are already being explained here and arrays are being explained here so there is no need for this section aswell.

Locust
This is something usefull but stand alone not enough for a tutorial, I also believe this was mentioned in an other tutorial about custom spells but I'm to lazy to look for it.

GUI
You give a very short explanation that's incorrect.
GUI is called the Graphical User Interface and is a mask for people that can't use JASS to still make triggers.

JASS
You don't realy help people with anything here.

Doodads, and Enviromental Things
- You gave incorrect information again, soem doodads can be selected and the ones you can't select aren't locusted. This is caused by this field in the object editor: "Art - Selectable Ingame - True/False".
- You don't have to surround doodads with pathing blockers, doodads can have their own pathing.
- You don't need the Ultimate Terraining Map to create terrains, it's only used for art terrains or to take a resource you might find usefull. (As far as I know.)
- You should not say: look on hive for this and that, instaid give some linsk or explain it yourself.
- Yay! A plus point, to give a unit locust and use the unit for the environent is very smart (I do it aswell).

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

I'm sorry man but overal your tutorial ain't that good. =(
It either explains things that have already been explained at other tutorials (and better) or you lack in the information department.
I suggest focusing on one thing, and create a tutorial about that. (And also check if nobody beat you to it.)

Also, don't add things to a tutorial if you don't know how to do it yourself. (Like JASS, telling people you don't know how to use it isn't realy good for a tutorial.

As a plus side I find it a good idea to use the [ hidden ] tags in your tutorial, I did the same to mine because it was getting to 'big'.

- Good Luck

(If you need me to take another look on your tutorial just send me an other pm, I hope it gets better.) =D
 
Level 22
Joined
Jun 24, 2008
Messages
3,050
I know it isnt :D
It was made as an experiment, and i hoped for other users to post, and refine it.
But as you see, this is kinda dead, your the first to comment it ^^
And this was an overall example, not the fully-indepth thing.
If people shoved interest, i would add links for more indepth going tutorials, but again, dead.

And hidden tags are genious!
I use them for everything large :grin:

And im not Chritique-shy so say everything you mean, feel, or think about it.

Some of the topics arnt explained well, and the reason, again, was that i wrote it a late friday night, in 10 minutes (+/- 5)
The Topics were jsut easely scrolled over, but would be refined by every "noob" who couldnt understand what im saying.
I expecially like the Trigger readings, but i have a hard time explaining it to my little brother, as many of the english words are to hard for him. :xxd:

Some of the Topics, such as GUI / JASS / Locust were basicaly made to fill in, and as a word-list.
When i started WE i had a hard time to figure out what "locust" was meaning.
Also for the Memory Leak part i am waiting for Kingz (You may know him) to reply.
He might accept an offer on enchancing that into the tutorial.

The reason no leaks are fixed in the trigger yet, is that the Leak Topic isnt "made" yet.
It would be fun the create a explanation enchaned with lot of ingoing things, that hadnt been talk'd about yet.
I belive that was all :wink:

Oh, and if you wish to participate with a topic, feel free, just msg me or post here with the text i should put in (With credits ofcourse :thumbs_up:)

Yah-
Best regards-
TheBlooddancer (Whom likes to write long ingoing texts)
 
Top