- 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
Welcome to the Final part of Triggered Spells.
To start of with this spell you Need:
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"
Again, i am going to read this for you:
If you can understand this, then you got a fairly big ammount of knowledge on Triggers.
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:
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:
-------------------[(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.
____________________________________________________________________________________________________________
Please, somebody, Comment it, and give a review.
Mods! Do not judge it yet, this is not Finished!
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:
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:
Now, im going to read my Trigger through:
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
-
Trigger Title
- Events
- Conditions
- Actions
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
-
Events
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
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
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!
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
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
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
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)
-
Loop - Actions
-
For each (Integer A) from 1 to 6, do (Actions)
-
Events
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.
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
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)
-
Events
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)
-
Events
-------------------[(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:
But you can allways set the variable again, ofcourse.
(Note) Allways remove locations etc, at the far buttom of the code.
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).
-
Actions
- Custom Script: call RemoveLocation(udg_NameOfVariable)
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.
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.
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.
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
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
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.
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
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)
-
Events
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: