| 12-29-2003, 02:09 PM | #1 |
Is there any way to raise the AC of a unit, depending on the size of a variable? Like if i have set an int. variable, "set bonus = 2", is there any way a unit can have its normal AC + my variable, "bonus" ? The only thing i can find is to change life and mana.. not AC (or str, agi, int for that matter) Anyone? |
| 12-29-2003, 09:09 PM | #2 |
Make an upgrade available for the unit just use no icon for the upgrade make 10 levels or so each adding a bonus to the attackspeed then use the action - Player - set current research level. |
| 12-30-2003, 12:47 AM | #3 |
Just make it such that for every integer from 1 to Var, add Item Armor Bonus (+1) to Unit. Add/Remove some of them everytime the variable changes. Can be done for"Item Armor Bonus" "Item Damage Bonus" "Item Life Bonus" "Item Mana Bonus" "Item Attack Speed Bonus" "Item Move Speed Bonus" or "Item Hero Stat Bonus" |
| 12-30-2003, 12:59 AM | #4 |
1.13 changed this behavior, so that no abilities at all stack. Weaadder made a method based on binary counting on Damage/Armor Bonus modifier |
| 12-30-2003, 01:23 AM | #5 |
Don't use that thread's version its very poorly built. Please use the one found in this thread. Read: People who used to stack abilites. This one is slightly harder to use for the end user because of the more generically named functions, but much easier for those are in the need of a quick method to add multiple bonuses to a unit. (Me and my little dialog Test 4) It also fixes the nasty nasty stutter bug. This version is also well documented. For your request you would now only have to have oneline of customcode added Code:
Custom Script: addBonus(amount to add, who, 1) //1 represents armor Extrarius is correct as of 1.13 they fixed the bug where stacking of an item with the same ability number would work. I'm curious if you pick up 6 rings of protection +1 does it add 6 armor or does it only add one...oh well more to test. |
| 12-30-2003, 10:26 AM | #6 |
It adds 6 the same with claws of attack |
| 12-30-2003, 01:20 PM | #7 |
I get a compile error with this: "call addBonus(1, udg_Vampire, 1)" - what did i miss? (Vampire is a unit var) Thanks anyway for the replies :) |
| 12-30-2003, 03:46 PM | #8 |
You have to copy all the code found in the header section of my map (and my trigger called array). And you'll also have to import or create your own abilities. |
