| 04-09-2004, 04:19 AM | #1 | ||||||||||||||||||
Well well... It seems that I got tired of making useless threads that last about 15 seconds, do to my extreme laziness. I figured, hey, I'll just make a tutorial so you can make your own!! What this is about Well, this tutorial is going to go through pretty much all of the basic know-how of making spells. I will do them by sections. I will try my best to give detailed instructions and little tips I learned along the way. Let's get started! The Basics Well, with everything, there is somewhere you have to start. You see, with Spell Making, there are a few actions that are a MUST for the Advanced-Basic Spell Maker. Now, here is a list of the MAJOR ones, if you don't fully understand what these are doing, then you my as well stop reading this tutorial, and learn more about the World Editor. Events Unit - Generic unit event This is your most important event, this means that any unit that accounts for what you chose, will trigger the event. The most popular ones are... Quote:
This is mainly for the more basic triggered spells. You will see more of these events than you will any others... generally. Now, just for the sake of this tutorial, I'm going to give you an example of the event I use the most, Quote:
This is for effects you want to do right when you click that target, or no-target spell. The effects will take place right away. Unless you have wait actions of course! Now, let's move onto the next section! Conditions Now, this section is a matter of preference. I generally don't use conditions other than... Quote:
That's it! There really aren't any other Conditional Functions you need to put in the Conditions Sector. Now, there is an Action, that will be used more than any other... Actions If/Then/Elses, your best friend, and your worst nightmare. You see, If/Then/Else's are going to end up being your most used action, if it already isn't. Now for those of you who don't know what it does, I ll break it down for you. IF/= This is the condition that will go here, most of the time it's detecting an interger, like the level of an ability. THEN/ = This is saying, if the IF/ is correct, such as IF/ {Interger Variable} = 1, THEN/ do... Whatever you want it to do if the desired condition[s] is/are met. ELSE/ = Well, if your Interger doesn't equal 1, then it will do whatever actions you put under this part. Now, that is the most friendly of the Actions. Your other big buddy, is the For Each Interger # to #. Now, I had written a tutorial on this before... but it was erased I guess with the "Upgrade". Now I'll just try to recap on it. A Loop is a set of repeating actions. You Loop or Repeat the set actions the set number of times. So if we wanted to make 5 different footman, (yes I know you can do this in 1 trigger, but this is for example sake, well not really, because I can do something with it...), then you would do a Loop like so. Quote:
Now, lets discect this baby. from 1 to 5, do Now, look. The first number, the 1, is saying that it will start at 1. This is a bad example for the use of the first number, because that doesn't get used nearly as much as the second number. Anyways, the seconds number, if it's not already obvious to you, is the amount of footmen being created. Now, there is a single advantage to using this instead of jsut creating 5 footmen at once. Arrays. Now, for those of you who don't know what arrays are, I guess I should explain what variables are as well... Variables + Arrays First off, a variable. Think of it as a information holder. Now, if you create a footman after the game is started, how are you going to acess that footman for later use? You won't be able to without variables! You see, if the unit is already pre-placed on the map, then you can use it when you select your unit actions. Allthough, when it comes time to use that unit you created in an action, you can't find him, because he isn't preplaced! Now, when you create the footman, you can just set him to a variable... Follow Along #1 Now, firstly, we need to create some of these variables. So, open up your trigger editor, and click the green X up top, or just hit CTRL + B. Then once your in the Variable Editor you will see a blank area most likely, and a Green X with an arrow pointing at it. Click that. Now, you have two blanks you must fill here. The variables name and what type of variable it is. Variable Name = George Variable Type = Unit Now, before you close it, look near the bottom where you see the word "Array", we want to check that box. I'll explain what it does later. Hit OK. Now, we have our variable, so let's put our newly created footmen into it. So create a new trigger. Now, for the Event, we want Map Initilzation, this means it will happen once the maps loads. We don't need any condtions. For the actions, we want a For Loop 1-5. Then, do a Unit - Create Footman action. After that, put a Set Variable Action. For the variable, we want our George Unit Variable. Then, for the Index, we want to put an Interger in, that Interger will be Interger A. Click that and on the other side of the = sign, we want to put Last Created Unit. Then hit OK. Ok, so our trigger should look like this. Quote:
Good. Now, let me explain what's going on. Interger A is a Temporary Variable, it just is used for that one loop, then that's it. It's done. It gets emptied for another use. So, everytime that Interger Loops, it adds one to its value. So on the first loop, it's value is 1. On its second loop, its value is 2. So on and so on. Then, once it hits whatever you put as its 2nd number, the loop ends. Moving on to the next set of actions. What that trigger just did What it just did was, it took all 5 of those footman, and set them to a variable, a variable ARRAY. Meaning, instead of making 10 actions of Create Footman, set George1 = Last created unit, 5 times, we did it 2 times. In a 5 time loop. Now, this is what it did to the footman. The first footman, in loop 1, was sent to Variable George[1]. The second footman, in loop 2, was sent to Variable George[2]. The value of Interger A during the 2nd loop. The same went on for the rest of the footmen. Now, let's explain that first number. Say, you didn't want to effect the 1st and 2nd footmen in a unit action, but you still wanted to use a loop. Still possible, it just requires knowledge of the first number. So, make a new loop, from Interger A 3 to 5. Since it only effecting footmen 3,4, and 5. Now, for the actions, lets kill them. So your actions would look like this... Quote:
Now, since the value of Interger A starts at 3 on its first loop, then it will only effect George 3,4, and 5! There you have it! Your a master at arrays and variables now! Note: If you do not understand what just went on right there perfectly, then read it over, and try it again. You MUST understand this to move on. Now let's move onto a new section... this is still in the basics... but it should be covered just in case. Dialogs Now, dialogs aren't as well known for spells. You never know though... Well, do you even know what a dialog box does? Well, what it does is, it brings up a menu of options you can choose from. It has a title, and buttons you can press. Depending on what buttons you press, you get different results. Let's do an example. Follow along #2 Variables needed Name----------Variable Type FollowAlong2_Dialog - Dialog FollowAlong2_BTN - Dialog BTN [Array] OK, once you have your variables set, we need to make a new trigger. I named mine FollowAlong2. Now, one thing you need to know about dialogs, is that they can't be created on Map Initizilation, this is because it can't create the board until some game time has gone by. So... for our event we want. Quote:
#-# - This just means that, THAT number can be whatever you want, just depends on the time you want your dialog to be created. So now that we have our event, let's move on to the actions. We don't really need a Condition since we're doing this at the begining of the map. Our first action is to make a Dialog Button. So, Hit the Actions button or CTRL + R, and then hit 'D' for the 'D' section of actions. Scroll down a little until you find... Quote:
Now, where it says, Dialog Variable, we need to put in our Dialog Variable. FollowAlong2_Dialog. For the Name of the First Button, we want to display a game text saying Hi!, so let's name the button, Game Text - Hi!. Hit OK. Your's should look like this. Quote:
If it doesn't go back and figure out what you did wrong. Now, we have to set that button to variable, so we can control it better later on. So after that, put a Set Variable Action. We want to set, FollowAlong2_BTN to the last created button. So... set up your variable like this. Quote:
The '1' in the [] array box, is just giving the variable a number, instead of having to have 4 button variables, we can have 1 array. Now, we need to make 2 more buttons and variables. Make them like this. Quote:
The last one is to show the dialog for Player 1, [you]. Once your done, we need to set the actions for the Dialogs we just made! Now, this is where our good old If/Then/Elses come in handy. You can do without them, at the expense of making 2 more triggers than needed. So, I'm going to show you the better way, to keep in good habits. Follow along #2 - Part 2 No new variables needed Allrighty, make a new trigger. I called mine FollowAlong2 2. For the event, we need... Quote:
Good. Now for the condtions, we need nothing. For this example at least. For the actions... we need to create an If/Then/Else. So, once you have your If/Then/Else ready, we need to put in a Condition. YAY our first one! Our Condition will be... Quote:
This detects when the what button was pressed. Good. Now, we need to set our actions for that in the /THEN section. Our actions for our first button are... Quote:
Yay! Now, this is a suggestion, but you don't have to, what I do is, I copy and paste (CnP), my first If/Then/Else, and paste it into the /THEN section. This just is what I call a Linkmaster Spoof, mainly because I'm too lazy to create a new If/Then/Else. ^_^ Now, this time, we need to make the Condition the same thing, but instead of [1] as the array, we want [2]. The second button. [/quote](Clicked dialog button) Equal to FollowAlong2_BTN[2][/quote] Our Actions to shake the camera are as follows... Quote:
Good. Now, for our last one. Paste the If/Then/Else into the /THEN slot again, change the array to [3] and let's create 5 footmen in the center of the map. Quote:
Done~! That's all you need to know about your Dialogs! It is very basic, but if you understood this, then you can make your own advanced version of Dialogs! Good Job! Note: If your dialog is stacking. Like... 1,2,3,1,2,3 Then that's because you need to clear the dialog, it needs to be reset before you add the same thing onto it. Just for reference, the Two Triggers we just made should look like this in the end... Quote:
and... Quote:
Tada! We are done with the basics! ------------------------------------------- |
| 04-13-2004, 05:34 AM | #2 |
Great tut, very clear instructions. No need to change the first part. I can't wait till you finish this. I always wondered what the 'interger A' crap was about. I'm learning how to make custom spells and I'm sure that this info will be of help in many ways. |
| 04-14-2004, 02:08 AM | #3 |
Great tutorial, you should add more to it, its really easy to understand. :D I've learned stuff from it too, and other ppl should take a look too. |
| 04-23-2004, 04:48 AM | #4 |
You should be shot. No actually you just have a lot of misspelled words, which are irksome. Go spell check, LM. [labeled not labelled] |
| 04-23-2004, 01:16 PM | #5 |
i learned much from this great Tutorial...add some more to it and then it may be the "tutorial of the week" Nemo |
| 04-28-2004, 08:17 PM | #6 |
OK I'm posting this because I read that you were gonna post the rest of it after 5 posts so here you go! This is your post! Oh yeah and by the way great tut it helped me a lot! :D :D :D |
| 04-28-2004, 08:25 PM | #7 |
Or you said something like that? :( No I've confused myself! |
| 04-28-2004, 09:44 PM | #8 |
Yes, I said that. I'll get started... |
| 04-28-2004, 10:47 PM | #9 |
I should start around 8 PM, 1 1/2 hours. |
| 04-30-2004, 03:20 PM | #10 |
I'm looking forward to the rest of it. Hope u finish soon. GL |
| 05-14-2004, 12:55 AM | #11 |
Nice tutorial. Although some of the methods you used to advertise it were a bit... ahm... unorthodox... (promoting it in top 10, 5 comments...) but its comming along fine. I think perhaps you should split it up and have the "basic triggering" tut as one seperate tut, the "spell making" tut as another one. But anyway, GJ. |
| 05-14-2004, 09:17 AM | #12 |
hey, this is a mad tut, helped heeps for newbies like me. whens it gonna get finished?!?! u said it would get done, but still nuthin. cant wait for the rest. gj, and thanx heaps :D ^_^ |
| 05-14-2004, 10:51 AM | #13 |
Hm? Where'd it all go? The tutorial was comming along fine, but now its gone or something. (That would be the spell section) Hrm. (Waits impatiently) Lol. N/m. I found it. (submitted tutorials section for anyone who wants to know) |
| 05-28-2004, 10:36 PM | #14 |
Eh, where is the Spell Triggering part which was the only thing i was interested in =(... |
| 05-28-2004, 10:46 PM | #15 |
Actually A unit begins casting /channeling an ability happen before the unit spends mana, those are there mostly for blocking spells I guess, but I think those events are completelly worthless cause I would block orders instead of abilities. For Trigger enhanced spells always use Starts the effect of an ability |
