Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
I am currently working on a orpg and i need some help with an idea for a system.
the idea is that the amount of armour equals the damage reduced.
So for example; you have 10 armour and you take damage, then that damage will be reduced by 10 (but not below zero).
Could someone please help me with a GUI system for this, (MuI ofcourse)
and maybe create one so I can use it in my project (u get credits in my orpg)
Create a dummy ability that does nothing. You can hide it with disabled spellbook or use Channel as base ability.
EDIT: Use Hardened Skin. It reduces damage by flat amount.
You can initialize every unit type like this:
Init Enemies
Events
Conditions
Actions
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to *some unit type*)) and do (Actions)
Loop - Actions
Custom script: set udg_i1 = GetHandleId(GetEnumUnit() )
Custom script: call SaveStringBJ( "2", StringHash("defence") , udg_i1, udg_Enemy_Hash ) // Could be saved as integer
Custom script: call SaveStringBJ( "1", StringHash("attack") , udg_i1, udg_Enemy_Hash ) // Could be saved as integer
whoa thx
I tried someshit and got something but....
i' m almost sure mine isn' t MUI.
Maybe a hashtable to fix this?
any suggestions for that?
BTW. the armour type doesn 't reduce anything it only tells you what your maximum armour type is "warriors can equip cloth,leather and mail, mage can only wear cloth)
as soon as i know how to post trigger i will give demo to show.
Create a dummy ability that does nothing. You can hide it with disabled spellbook or use Channel as base ability.
EDIT: Use Hardened Skin. It reduces damage by flat amount.
You can initialize every unit type like this:
Init Enemies
Events
Conditions
Actions
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to *some unit type*)) and do (Actions)
Loop - Actions
Custom script: set udg_i1 = GetHandleId(GetEnumUnit() )
Custom script: call SaveStringBJ( "2", StringHash("defence") , udg_i1, udg_Enemy_Hash ) // Could be saved as integer
Custom script: call SaveStringBJ( "1", StringHash("attack") , udg_i1, udg_Enemy_Hash ) // Could be saved as integer
Each armor piece has an ability that grants +armor so the green armor value bonus is the same as your total armor.
You must also set all armor values to an array, and item types to an array.
Set Armors[1] = Ũber armor
Set Armors[2] = Even more über armor
Set Armor_Values[1] = 1
Set Armor_Values[2] = 3
When you acquite an item, loop through the item type array, then you get the armor value based on the index.
You character has an integer stored which represents the total armor. You update it when you lose/acquire armor, and set the level of the armor ability based on that.
I've almost completed map 1 of a campaign that uses this system, and it does work.
Each armor piece has an ability that grants +armor so the green armor value bonus is the same as your total armor.
You must also set all armor values to an array, and item types to an array.
Set Armors[1] = Ũber armor
Set Armors[2] = Even more über armor
Set Armor_Values[1] = 1
Set Armor_Values[2] = 3
When you acquite an item, loop through the item type array, then you get the armor value based on the index.
You character has an integer stored which represents the total armor. You update it when you lose/acquire armor, and set the level of the armor ability based on that.
I've almost completed map 1 of a campaign that uses this system, and it does work.
Maker-nice system! But I think your trigger is a bit messy for only-GUI ppl, and I could solve it fully in GUI (yeah, would get the same results, so anyway, nice work! Mine would like: Unit-type array, 3 real arrays (min/max dmg&def) but I prefer this because I can avoid custom scripts )
What exacly do you mean with ''credit''
Is is like a floating-text wich shows the amount of damage dealt?
Or is it a floating-text wich shows the amount of xp gained?
When a unit A deals damage to unit B, leading to unit B's death, then A is marked as the killer and he gets exp and is the Killing Unit (event response).
In that system, one must not use "set life of unit to life of unit - x", one must use " unit - damage target ( chaos, universal for full damage). And turn off/on the trigger so it doesn't cause an infinite loop.
You can try to use my system of armor detection. And then you create spell Hardened Skin and make it ex. 1lvl-1 damage reduces, 2lvl-2 damage reduces,... and so on. Set the maximum level to ability to maximum armor some unit can have. Set normal and pierce damage deal 100% to all armor types. Then every second set level of ability to unit armor.
Note : this won't work for magic attack, but in basic warcraft 3 magic attack is not reduced by armor i think. Also this does not work for negative armor.
Or the maker could advance to Starcraft II where the armor system defaults to this functionality.
Anyway, GUI is too inefficent to properly execute such a fundimental system. As this will run often you need to make sure it is as efficent and leakless as possible. Problem is GUI and leakless are muturally exclussive as many GUI actions leak local handle indexes.
Tools like vexorian's optimizer can combat the GUI leaks by replacing the function calls with custom function calls which do not leak.
However this still does not make up for the unefficent coding that GUI automatically generates. Additionally GUI does not give you as good flow control as you have access to with pure JASS code so many optimizations are unavailbe to GUI.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.