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??
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.
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 :nuts:
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.
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.
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.
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.
@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.
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
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
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
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.
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