Spells - Basics of Trigger Enhancing Spells

Murkatal

New Member
Reaction score
3
Omg this is an amazing tutorial. It is one of the best ones i've seen yet. I'd hug u but i'm not gay and i dun't know where u live
 
C

careswho

Guest
hi confused...

im confused at this part... im a beginner at this as in from scratch..

i dont get the part of making a formula...first of all...where can i make it?where can i type it down??how can i put it in??please help me... i dont know this part..
this is the passage:

Now, things get more complicated, because depending on the type of the target (organic, mechanical or building), the dummy does something. It is clear that this is the step where things get different for each single-target spell. We are going to use multiple Ifs, each to check if the target is Organic, or Mechanical or Building. I don’t suggest you insert in the else of an if another IF because you may slowly realize that you get nothing from the code, especially when more complicated codes come out.

So, we will start with the first IF. It checks if the target is a building, and if it is, it damages the target. However, for the damage you need a formula, because if the level of the ability is bigger, then the damage is bigger as well. So your formula must depend on the level of the ability. Let’s have a look at the damage:

50 for level 1, 75 for level 2 and 100 for level 3. It is clear that with each level, the damage increases by 25. This difference between levels MUST be a constant if you want to use a formula. The difference is called Ratio. Usually the formula is something like this:

Code:

(Level 1 damage – Ratio)+(Ratio*Level of the Ability)

And suddenly things are getting simpler eh? In code, the formula would look like this:

Code:

Damage = (50-25)+(25*(Current Level of (Shocking Destructor) for (Triggering Unit))

This formula can even be simplified, to ease the work of the PC and make your spell more efficient. You already know that 50-25 is 25. Instead of putting the game calculate it everytime the spell targets a building, do it yourself. It doesn’t cost you anything, but it does the PC. Make your formula as efficient as possible!
.................................
..............................
........................
and this one too:

If (((Target unit of ability being cast) is A structure) Equal to True) then do (Unit - Order (Last created unit) to damage (Target unit of ability being cast) for (25.00 + (25.00 x (Real((Level of Shock Destructor for (Triggering unit)))))) using attack type Magic and damage type Fire.) else do (Do nothing)


i tried to trace on the triggers to make this code but i get stuck on the for(25.00 ... i cant find it.. please..immidiate help will be useful


and one more thing...where can i paste the codes??
 

HellCraft

Member
Reaction score
19
nicely made tutorial, although i already knew most of this stuff, i learnt something in the buff spell part. +rep

@careswho

u don't need to type the formulas anywhere. make it in your mind and directly put it into the trigger.

well, the computer cant know things that u don't tell it(or some1 else tells it). so u need to tell the comp something. as he said there are 2 ways of telling the comp.
the 1st one is telling it to the comp directly.(Use if/then/else like its mentioned in the tutorial)

the 2nd one has the use of the formula.

one way of approaching this is as if ur a sage who always speaks in riddles whenever giving advice. Here, u r the sage and the comp is seeking advice from u, he wants to know the damage of the shock destructor spell. as u r a sage u will give this in a riddle, and the riddle is (50-25)+(25*(Current Level of (Shocking Destructor) for (Triggering Unit))

another way of approaching this is like a normal formula. u must be knowing that (a+b)sq = a sq + b sq + 2ab(sq stands 4 square). whether a is 1,2 or 3 or b is any number the answer is same.
similar way, u make a formula that appears true in all lvls, in this case (50-25)+(25*(Current Level of (Shocking Destructor) for (Triggering Unit)) is a formula that is true in all 3 lvls. calculate urself and see.
 

Pokesam94

New Member
Reaction score
0
OMG OMG OMG... this is so awesome it makes me feel crap cuz i sort of understand it but i probably couldnt use it cuz im sooooo dum with triggers.the first reason i read this is because a guy pointed this to me to learn about dummy units for my defence rockets spell...lol i still cant do it :D:nuts:
 

wraithseeker

Tired.
Reaction score
122
You should take some time to settle down and scan the code from the first letter to the last letter and then trying to make a spell similar to that example in tutorial. It works , but takes time.
 

Astal

New Member
Reaction score
1
Very helpful tutorial, im having a hard time adapting it to my own spells. Specifically the one that casts lightning bolt when attacking. I made a thread in the main area if i dont get any responses ill post here.
 

Zaleramancer

New Member
Reaction score
0
I am really bad with triggers and i am trying to make a basic spell to better understand how to do this. There is just one problem i cant find the Unit - Order unit to damage unit anywhere. Where is it? Im just lost here.
 

jonasOx

New Member
Reaction score
0
Great!

Awesome tutorial! This helped me a bunch. Not only about trigger enhancing spells, but about triggers in general.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top