• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Plz need help with basics of formula and triggers ?

Status
Not open for further replies.
Level 1
Joined
Nov 6, 2012
Messages
2
Hi this is my first post in this site
i've read the tutorial http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/basics-trigger-enhancing-spells-7334/ to learn my first steps to world editor
but to know i could only understand what i could and i think i'll know more if give it another read or by practicing in the editor itself
also math i've studied is diffrent so i could barely understand the mathmatics in the editor due to my college studying
i understand what is formula and can make a smiple one but i have 2 problems here
in the pervious tutorial i could complete it to the end of making generic timer to the dummy but at start of the formula of the dmg i was confused
first
(Level 1 damage – Ratio)+(Ratio*Level of the Ability)
Damage = (50-25)+(25*(Current Level of (Shocking Destructor) for (Triggering Unit))
those 2 r they made insde or ouside the editor? and if so how to write them using the editor
2nd
Unit - Order (Last created unit) to damage ..... for ....
i don't have such action its wether
Unit - Order (Unit) to attack (Unit)
or this one
Unit - Cause (Unit) to damage (Unit) dealing 500
so i mean i couldn't find something with unite order to dmg.... for
3rd
the formula itself
(25.00 + (25.00 x (Real((Level of Shock Destructor for (Triggering unit))))))
how can i put it in the trigger kept looking about any thing allows me to write it in this form but couldn't find
Sry for my bad english and thnx for ur concerning:ogre_haosis:
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Math is always the same, it shouldn't really be that different.
When working with damage and spells, it's just creating a formula that scales with the level - much like the well-known "y = mx + b". In programming, "y" could be "damage"; "x" would then be the spell level; "m" would be the ratio and "b" would be the base (constant).
So "y = mx + b" becomes "Damage = Ratio*Level + Constant". Exactly the same as math, but then with different names :)

those 2 r they made insde or ouside the editor? and if so how to write them using the editor
Can be both.
Inside the object editor: right-click on the damage-value and select "Auto fill levels".
Set the base value to 50 and the constant to 25 (leave the rest the same).
This should give you 50 / 75 / 100 damage.
yI4bs.jpg


In the trigger editor: use arithmetic functions. More on that below.

3rd
the formula itself
(25.00 + (25.00 x (Real((Level of Shock Destructor for (Triggering unit))))))
how can i put it in the trigger kept looking about any thing allows me to write it in this form but couldn't find
First: create a real variable.
You can open the variable editor by pressing CTRL + B, or by clicking the yellow X-icon in the trigger editor.
Now you can create your new variable.
As the name, choose whatever you want (I will pick "damage") and as type, select "real" (which is a decimal number).

Create the action "Set Variable" -> "Set damage = ... ".
For the value, you will need the "Arithmetic" function a lot. Use it whenever you want to add/subtract/divide/multiply a number.
Like 25 + 25 uses the "Arithmetic" function.

Well, here's a short image-guide:
kUCrp.jpg



YFyQN.jpg


Finished!
  • Set damage = (25.00 + (25.00 x (Real((Level of Acid Bomb for (Triggering unit))))))
 
Level 1
Joined
Nov 6, 2012
Messages
2
Thanks

Use

Unit - Cause (unit) to damage (unit)

When you select the action, click on the blue-underlined number to bring up the real functions. In there, select Function: Arithmetic, and do the math from there.

Should be self-explanatory if you can get that far

i think i could each this part but no far after arithmatics getting those hetbatches or whatever and lost anyway thanks man along with ap0calypse i hope to be able to complete it


Can be both.
Inside the object editor: right-click on the damage-value and select "Auto fill levels".
Set the base value to 50 and the constant to 25 (leave the rest the same).
This should give you 50 / 75 / 100 damage.
yI4bs.jpg
[/hidden
]
well thank you first man for fast replaying but u misunderstood i meant if it is needed to format or calculate that formula inside the editor even before putting it in the action

In the trigger editor: use arithmetic functions. More on that below.


First: create a real variable.
You can open the variable editor by pressing CTRL + B, or by clicking the yellow X-icon in the trigger editor.
Now you can create your new variable.
As the name, choose whatever you want (I will pick "damage") and as type, select "real" (which is a decimal number).

Create the action "Set Variable" -> "Set damage = ... ".
For the value, you will need the "Arithmetic" function a lot. Use it whenever you want to add/subtract/divide/multiply a number.
Like 25 + 25 uses the "Arithmetic" function.

Well, here's a short image-guide:
kUCrp.jpg



YFyQN.jpg


Finished!
  • Set damage = (25.00 + (25.00 x (Real((Level of Acid Bomb for (Triggering unit))))))
This is what i really wanted to know gonna try it and if i faced any problem i'm gonna post it or even send u pm

Math is always the same, it shouldn't really be that different.
When working with damage and spells, it's just creating a formula that scales with the level - much like the well-known "y = mx + b". In programming, "y" could be "damage"; "x" would then be the spell level; "m" would be the ratio and "b" would be the base (constant).
So "y = mx + b" becomes "Damage = Ratio*Level + Constant". Exactly the same as math, but then with different names :)
oh yeah the funniest part u r right its the same math but i studied math in english along with discrete structures and those formuals r really really similar to what i've studied in discrete structures was great brought A the subject was very very easy
but belive me when i say the math expresions ,Parentheses and the ways were diffrent than studing it in arabic and i failed to pass it even with super super hard math subject of the secondary school about X10 times harder and more (belive it finished the year with more than 350 pages of 3 notebooks full of solved exercies of Statics ,mechanics ,Calculus and Algebra :eekani: and it took about 2 full months of revisions for the math subject before the final exam )
secondary school subjects here in Egypt r deadly even ended up with degree equal to B+ but in arabic so the math in english was really weired for me even in the way u answer ;as inmy whole life we had to write the answer in external papers than the one which has the questions lol but that was different when learning by the american system
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
oh yeah the funniest part u r right its the same math but i studied math in english along with discrete structures and those formuals r really really similar to what i've studied in discrete structures was great brought A the subject was very very easy
but belive me when i say the math expresions ,Parentheses and the ways were diffrent than studing it in arabic and i failed to pass it even with super super hard math subject of the secondary school about X10 times harder and more (belive it finished the year with more than 350 pages of 3 notebooks full of solved exercies of Statics ,mechanics ,Calculus and Algebra :eekani: and it took about 2 full months of revisions for the math subject before the final exam )
secondary school subjects here in Egypt r deadly even ended up with degree equal to B+ but in arabic so the math in english was really weired for me even in the way u answer ;as inmy whole life we had to write the answer in external papers than the one which has the questions lol but that was different when learning by the american system
I hope you don't mean that things like our numeral system, parentheses and x/y are part of "the American system", as they're mostly Arabian/European. America only become independent late 18th century. Though they've contributed a lot to modern math, the mathematical notation (mostly) existed before that.

Well, I have no idea how math is in Egypt. At least it seems like the standard mathematical notation is easier compared to the one they use, so it's good that you've studied that :).

Anyway, you're free to PM me if you didn't quite understand my previous post.
 
Status
Not open for further replies.
Top