Whats the difference between an ability and a behavior? Lets assume I want a unit to teleport randomly when the player clicks a button situated right below the attack button. Would that involve an ability? A behavior? A trigger? How does all that work?
Also, would it be possible to give every unit type this button in one fell swoop?
Behavior - Passive (Ability/Stats) <- Buffs are also classified here
Ability - Activity
As for teleporting to a random location. You would make a dummy ability and a trigger for when the ability is used. That trigger should move the unit instantly to a random point in entire map. Sounds like you are just starting out. Experiment as much as possible; GL HF.
Abilities must be added via the data editor, because you need to edit the command card to assign a button to the ability. If you don't want to bother then some sort of custom UI button is the way to go - and you can easily implement the teleporting with triggers so you shouldn't need to touch the data editor at all.
There are some shortcuts to adding the ability to all of the units.
You can select multiple objects in the data editor and modify multiple fields at once. The problem is that any fields you modify will all end up the same. You can't just add an ability to every unit's field, you end up replacing the whole field with that ability.
In my tower defense, I actually ended up giving every ability to every runner. Since the use of the abilities is handled by triggers, it didn't matter if a Zealot had cloak or whatever because the trigger that causes cloak to be used doesn't run for Zealots.
It also is generally a lot quicker when working with a lot of data to view raw data and copy and paste. So I can just copy the string "Personal Cloaking|" then go through each of the units, highlight the abilities field, and paste it in there right after the first parenthesis. You still have to go back and edit the command card to make the button appear, but it's a start.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Whats the difference between an ability and a behavior? Lets assume I want a unit to teleport randomly when the player clicks a button situated right below the attack button. Would that involve an ability? A behavior? A trigger? How does all that work?
Also, would it be possible to give every unit type this button in one fell swoop?
Behavior - Passive (Ability/Stats) <- Buffs are also classified here
Ability - Activity
As for teleporting to a random location. You would make a dummy ability and a trigger for when the ability is used. That trigger should move the unit instantly to a random point in entire map. Sounds like you are just starting out. Experiment as much as possible; GL HF.
@zifoon:
Cool, thanks!
But which trigger gives a unit an ability?
Can I give all unit types the ability with triggers?
I really don't want to go through the data editor adding the ability to each unit. If it comes to that, I'm just gonna make a custom UI button...
Abilities must be added via the data editor, because you need to edit the command card to assign a button to the ability. If you don't want to bother then some sort of custom UI button is the way to go - and you can easily implement the teleporting with triggers so you shouldn't need to touch the data editor at all.
@xytor: Go
There are some shortcuts to adding the ability to all of the units. You can select multiple objects in the data editor and modify multiple fields at once. The problem is that any fields you modify will all end up the same. You can't just add an ability to every unit's field, you end up replacing the whole field with that ability. In my tower defense, I actually ended up giving every ability to every runner. Since the use of the abilities is handled by triggers, it didn't matter if a Zealot had cloak or whatever because the trigger that causes cloak to be used doesn't run for Zealots.
It also is generally a lot quicker when working with a lot of data to view raw data and copy and paste. So I can just copy the string "Personal Cloaking|" then go through each of the units, highlight the abilities field, and paste it in there right after the first parenthesis. You still have to go back and edit the command card to make the button appear, but it's a start.