PDA

View Full Version : Ability require another ability


Stormrage50
09-19-2007, 03:59 AM
yo how would i make an ability require another ability? like say i made an ability "Arm Bash" thats like dragon knights dragon tail ability, but i also have an ability called "Rock Arm" which adds armor. How would i make it so you had to learn "Rock Arm" before you could learn "Arm Bash"???? :con:

donut3.5
09-19-2007, 04:12 AM
One option is to create a dummy unit, meaning it has no attack, no movement, no shadow, has the abilities locust and invulnerability, and has the tree of life upgrade ability as its model. Then do:

Events
Hero - A Hero Learns an Ability
Conditions
Hero - Ability being learned is equal to Rock Arm
Actions
Unit - Create 1 DummyRockArm for Owner of Triggering Unit at Center of Playable Map Area facing Default building Facing

Note: It leaks.
Finally, set your techtree requisites for Arm Bash to DummyRockUnit.
If you want, you can make a periodic trigger that checks whether or not the Hero has Rock Arm or not (in the case of wanting to use Tomes of Retraining), and if it doesn't, then remove the dummy unit. However, note this will only work if one type of the hero is on the map per player, or else once one learns it they can all use Arm Bash.

Off-topic, but be sure to introduce yourself to the hive!
--donut3.5--

Just_Spectating
09-19-2007, 04:50 AM
i thought you could make the techtree require an ability

EDIT:
never mind. but you can use upgrades instead for techtree. and if you have the certain upgrade then you can learn the ability, just trigger that you will get the upgrade once you gain the skill required for the second skill

donut3.5
09-19-2007, 04:51 AM
No, since an ability is unit specific, an upgrade, tier, or unit is player specific.
--donut3.5--

Just_Spectating
09-19-2007, 04:59 AM
Upgrade
Events
Unit - A unit Learns a skill
Conditions
Actions
Player - Set the current research level of blah to 1 for (Owner of (Triggering unit))

donut3.5
09-19-2007, 05:06 AM
Researches can't be undone. Units can.
That's only in the case you want to use tomes of retraining or something of the like though.
--donut3.5--

Just_Spectating
09-19-2007, 05:17 AM
Upgrade
Events
Unit - A unit Learns a skill
Conditions
Actions
Player - Set the current research level of Iron Plating to 0 for (Owner of (Triggering unit))

edge[d1]
09-19-2007, 09:14 AM
you can not reduce the level of an upgrade. only increase.

f you want, you can make a periodic trigger that checks whether or not the Hero has Rock Arm or not (in the case of wanting to use Tomes of Retraining), and if it doesn't, then remove the dummy unit.
luckily, there is "unit uses an item" event that makes that even simpler and without periodic checking...

Need_O2
09-19-2007, 12:01 PM
There is a MUCH better way to do it you know the ability that improves other abilities
It doesnt improve them it changes them add a rockarm ability with the ability Im talking about (2nd ability of Tinker dont remember its name)
Well make normal Arm Bash passive useless ability and make armrock changes arm bash into a close ranged storm bolt ability It changes whole and make icon of normal arm bash disabled I hope you know how to do it

OR use donut3.5's way

Stormrage50
09-20-2007, 03:02 AM
ty guys, why didnt i think of that :hohum:

Stormrage50
09-22-2007, 03:51 AM
wait... how do i get the Hero-Hero learns an ability
all i can get is Unit- Unit learns a skill

Just_Spectating
09-22-2007, 05:06 AM
thats right. in the conditions you can add, triggering unit is hero = true