HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

adding abilities with triggers?

04-06-2003, 03:58 AM#1
layzie86988
Is it possible to add abilities through triggers? I want to be able to add regular unit abilities through triggers not just hero skills. Thanks in advance for any help.
04-06-2003, 04:06 AM#2
DaKaN
you make sure it starts off so it isnt researched, (meaning if its a new ability you are editing, base it off one that needs to be researched first). Then at the appropiate time, you use:

Player - Set Current Research level of "Tech" to "number"

and it will become researched.
04-06-2003, 04:45 AM#3
layzie86988
That's a good idea actually, and I might have to do that, but I was thinking is it possible to not have that ability on that hero in the unit editor, but still give it to him with triggers? For example, if I wanted to sell abilities or something at a shop.
04-06-2003, 04:47 AM#4
Guest
That isnt possible.
04-06-2003, 05:34 AM#5
DaKaN
all abilities must be given to any unit in the editor. Cannot create abilities on the fly. you can however, replace a unit with a new unit that has that ability....
04-06-2003, 06:25 AM#6
layzie86988
Figures. Thanks guys.
04-06-2003, 12:53 PM#7
KaTTaNa
You can sell abilities if you give your hero all the possible abilities from start, and then do that research thing as Dakan suggested you only need a trigger like this:

Event A unit owned by player 1..12 acquires an item
Conditions (Item type of (Acquired item)) Equal to Spellbook
Actions Set current research level for (Owner of (Hero manipulating item)) for *tech* to *level*

I don't know if it's any better than layzie86988's solution but this one allows you to purchase multiple spells with a single character.
04-06-2003, 05:41 PM#8
layzie86988
yeah, I don't think that would work out the way I want it to. If I give him all the abilities from the start, that fills up all of his skill spots so he can't get hero skills. But thanks anyway.
04-06-2003, 06:08 PM#9
KaTTaNa
If you don't want the greyed out icons to appear while not having any you should simply disable all the spells from start and when a player buys a spell book use the Player - Enable/Disable Ability to re-enable the ability.
Once a player has bought more than 2 books you could remove the first spell again so he could have a maximum of 2* learnt spells (so they don't take up the spaces for the hero abilities).

* Why 2? There are only 2 fields not occupied by other buttons. Just set all the custom spell buttonpos to 1,1 - they will automatically fill up the other field if the first one if occupied.
04-06-2003, 06:36 PM#10
layzie86988
That's awesome! Thank you, that's exactly what I was looking for.
04-06-2003, 06:51 PM#11
DaKaN
i belive if you disable a ability, you cannot reenable it during the map... but its something to test
04-06-2003, 09:04 PM#12
layzie86988
I tried it with a couple different abilities and it seemed to work.
04-06-2003, 09:22 PM#13
DaKaN
in that case good =)
04-06-2003, 10:31 PM#14
layzie86988
Very. Thanks everybody