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.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top