Chaosy
Tutorial Reviewer
- Joined
- Jun 9, 2011
- Messages
- 13,219
General Spell Creation - by Chaosy
Introduction
Hello, I thought it would be nice of me to upload a little guide/tutorial on how to create spells in general with triggering.
In almost every spell you use a config trigger, one cast trigger and one looping trigger so this tutorial will help you creating almost any spell.
Please notice I don't say that my way to trigger is the best one but it's the way I like the most.
In almost every spell you use a config trigger, one cast trigger and one looping trigger so this tutorial will help you creating almost any spell.
Please notice I don't say that my way to trigger is the best one but it's the way I like the most.
How skilled do I need to be to understand and use this tutorial?
You need to understand the triggering in general, you need to know how to use actions events and so on.
Ready? Let's go then
So to start with we need a spell idea, I will simply create a spell that damages a unit by X every Y seconds for Z seconds.
So now that you got a spell you want to create we can start triggering, first off we need to create the setup trigger.
You may notice that the name is SS_X. The SS stands for some spell, and we use that kind of variable name to make the name unique. So if your spell is named Fire Dagger, you should use FD_X.
So to explain the variables, we have 3 real variables: SS_time is how often we will damage the unit, SS_damage is how much damage the spell will deal per tick, and SS_duration is the duration of the spell obviously.
Note: The array stands for the level of the ability so the spell will deal 5 damage every 3 seconds at level 1 and 10 damage at level 2.
Next up is the cast trigger.
and then the loop trigger.
If you don't know how hashtables work this will indeed be very confusing to you, so I will try to explain how it works.
Hashtables are an action we can use to make the spell MUI. They save something and locks it with 2 keys. I will try explain in a odd way, but I think it is easier.
So let's say we have a bank, firstly we need to create the bank right? We should put this in the setup trigger:
Now, if we want to put something into the bank we need an account.
So for example, I can store 0.00 in the bank, but then I need to tell which account I want to put it in.
this saves 0.00 in the account called (Key (Target unit of ability being cast)) + 1
now the 0.00 is successfully stored. And then we can unload it.
If you have coded before this is basically a 2d array. For example.
If you don't understand me you should check out a tutorial:
A Complete Beginners Guide to Hashtables
Hashtables and MUI
So now that you got a spell you want to create we can start triggering, first off we need to create the setup trigger.
|
You may notice that the name is SS_X. The SS stands for some spell, and we use that kind of variable name to make the name unique. So if your spell is named Fire Dagger, you should use FD_X.
So to explain the variables, we have 3 real variables: SS_time is how often we will damage the unit, SS_damage is how much damage the spell will deal per tick, and SS_duration is the duration of the spell obviously.
Note: The array stands for the level of the ability so the spell will deal 5 damage every 3 seconds at level 1 and 10 damage at level 2.
Next up is the cast trigger.
|
and then the loop trigger.
|
If you don't know how hashtables work this will indeed be very confusing to you, so I will try to explain how it works.
Hashtables are an action we can use to make the spell MUI. They save something and locks it with 2 keys. I will try explain in a odd way, but I think it is easier.
So let's say we have a bank, firstly we need to create the bank right? We should put this in the setup trigger:
|
Now, if we want to put something into the bank we need an account.
So for example, I can store 0.00 in the bank, but then I need to tell which account I want to put it in.
|
this saves 0.00 in the account called (Key (Target unit of ability being cast)) + 1
now the 0.00 is successfully stored. And then we can unload it.
|
If you have coded before this is basically a 2d array. For example.
-
Actions
- Set array_one[1] = 64
- Set array_one[2] = 86
- Set array_one[3] = 33
- Set array_two[1][1] = 34
- Set array_two[1][2] = 55
- Set array_two[1][3] = 75
If you don't understand me you should check out a tutorial:
A Complete Beginners Guide to Hashtables
Hashtables and MUI
Attachments
Last edited: