Any base ability can be made autocast by setting its flag in the ability fields. You will need to create some validators for it, but other than that, you don't need to do anything special (unless you want to get into the realm of having the unit target stuff with the ability in a specific way, in which case you would need to get into target sorts etc. But since your ability is just an autocast on self, you don't need to worry about that).
About your second question, there are multiple ways to have a unit randomly cast one of his abilities, though for the sake of simplicity, I would suggest having just one ability with numerous effects that are randomly fired, i.e. the ability's effect field can be a set with all the effects of all the other abilities the unit would randomly pick from. Set a random number list which will fire one of them only if the random number generator spits out a specific value range.
e.g. 1-25 : Effect of Ability 1
26-50 : Effect of Ability 2
etc...
Naturally, there are other ways to do this, but I'm not sure about how confident you feel with the data editor for me to go into those explanations.
You want the sentry to autocast the shield, whenever it wears off? Just give it a cooldown equal to its duration and no validator for the autocast. So it casts whenever possible, on every cooldown.
The unit should spawn 1 unit randomly on autocast, but should be able to spawn each of the 9 units individually by manually clicking? Or always spawn a random unit?
for the Sentry , how do i set a COOLdown? is that in the ability info + ???
but how do i set it to auto cast with cooldown if i dont use Validators to see if the cooldown is done?? ( i dotn wana use triggers )
maybe u can show me witch Fields i need to EDIT? please :)
and for the units spawning 9 types of units: needs to be AUTOCAST one of the 9 units at RANDOM ( its liek the brood lord but insted of spawning broodl;ings , it spawns 9 Unique unit that i have made with unique abilities. Maybe i can use to broodlord abilitie and set to spawn does 9 unist 1 at a time?? that possible? )
( none of my units has the abilities to be selected , in other words all the units are AI ( like in TUG OF WAR Games )
for the Sentry , how do i set a COOLdown? is that in the ability info + ???
but how do i set it to auto cast with cooldown if i dont use Validators to see if the cooldown is done?? ( i dotn wana use triggers )
Cooldown for an ability is set in the "Cost - Cost +" field. Open that up and if there isn't already an entry there, create one. Then scroll down to the area where it says "Cooldown", which should contain four things: Link, Location, Time Start and Time Use.
Link is used to tie the cooldowns of different abilities into one another. For example, the cooldown after warping in a unit from a Protoss Warp Gate. You only use one thing, but ALL of them enter cooldown. When an ability with a given Link (which can be any text string you enter; it's not something you define anywhere else but here) is used, the cooldown period will be applied to both that ability AND any other abilities which share that Link.
Location I don't have too much experience with, but I think it determines what level the cooldown is applied to. If it's just to "Unit" then it only applies to the unit that uses the ability. "Global" may mean that it applies to all units the player owns with that ability, but I'm not sure. Go with "Unit" to be on the safe side.
Time Start is like a "starting" cooldown, which determines how many seconds after the unit is created the ability can be used for the first time. If you set this to zero, the unit can use it right away (provided it has enough energy or whatever). If you set it higher, it will have to wait awhile for the ability to be ready.
Time Use is the cooldown duration itself, again in seconds.
Autocasting units without a Validator to [i]prevent[/i] them from Autocasting will use the ability immediately every time it is ready to be used. Use a Validator (let's say something like "Enemies Nearby") to limit their autocasting to only when certain conditions are met. They don't need to be told whether or not it's in cooldown; they know that instinctively.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
hey ,
i have a phew Units that need to have a AUTO cast abiliti for the spells
EXP: i have sentrys that automaticly spawn there shiled every time it goes DOWN , problem is im using triggers to do this.
its LAGING the game SOOO bad when u send out like 15+ sentrys at a time ,
- how would i do this with OUT the triggers?? what TYPE of abillity/behaviour dos autocast??
- Also , iof my unit has 2 + abilities that need AUTOCAST how do i do it RANDOMLY autocast 1 of his XX abilities!?
thanks.
@Selfcreation: Go
Any base ability can be made autocast by setting its flag in the ability fields. You will need to create some validators for it, but other than that, you don't need to do anything special (unless you want to get into the realm of having the unit target stuff with the ability in a specific way, in which case you would need to get into target sorts etc. But since your ability is just an autocast on self, you don't need to worry about that).
About your second question, there are multiple ways to have a unit randomly cast one of his abilities, though for the sake of simplicity, I would suggest having just one ability with numerous effects that are randomly fired, i.e. the ability's effect field can be a set with all the effects of all the other abilities the unit would randomly pick from. Set a random number list which will fire one of them only if the random number generator spits out a specific value range.
e.g. 1-25 : Effect of Ability 1 26-50 : Effect of Ability 2 etc...
Naturally, there are other ways to do this, but I'm not sure about how confident you feel with the data editor for me to go into those explanations.
well the one with multiple abilities
its a Unit that has the ability to train 9type of units , i want him to randomly spawn one of does 9 units at a time. with autocast.
could that be done the same way as you said?
and
Im not sure what i have to set as Validators for the first one , im not good with does yet :P
do i just ne to go the the ABILITIS = Autoacst VAILIDATOR , and add AIAutoacst when IN or OUT of combat?
Bumb
You want the sentry to autocast the shield, whenever it wears off? Just give it a cooldown equal to its duration and no validator for the autocast. So it casts whenever possible, on every cooldown.
The unit should spawn 1 unit randomly on autocast, but should be able to spawn each of the 9 units individually by manually clicking? Or always spawn a random unit?
for the Sentry , how do i set a COOLdown? is that in the ability info + ???
but how do i set it to auto cast with cooldown if i dont use Validators to see if the cooldown is done?? ( i dotn wana use triggers )
maybe u can show me witch Fields i need to EDIT? please :)
and for the units spawning 9 types of units: needs to be AUTOCAST one of the 9 units at RANDOM ( its liek the brood lord but insted of spawning broodl;ings , it spawns 9 Unique unit that i have made with unique abilities. Maybe i can use to broodlord abilitie and set to spawn does 9 unist 1 at a time?? that possible? )
( none of my units has the abilities to be selected , in other words all the units are AI ( like in TUG OF WAR Games )
Cooldown for an ability is set in the "Cost - Cost +" field. Open that up and if there isn't already an entry there, create one. Then scroll down to the area where it says "Cooldown", which should contain four things: Link, Location, Time Start and Time Use.
Link is used to tie the cooldowns of different abilities into one another. For example, the cooldown after warping in a unit from a Protoss Warp Gate. You only use one thing, but ALL of them enter cooldown. When an ability with a given Link (which can be any text string you enter; it's not something you define anywhere else but here) is used, the cooldown period will be applied to both that ability AND any other abilities which share that Link.
Location I don't have too much experience with, but I think it determines what level the cooldown is applied to. If it's just to "Unit" then it only applies to the unit that uses the ability. "Global" may mean that it applies to all units the player owns with that ability, but I'm not sure. Go with "Unit" to be on the safe side.
Time Start is like a "starting" cooldown, which determines how many seconds after the unit is created the ability can be used for the first time. If you set this to zero, the unit can use it right away (provided it has enough energy or whatever). If you set it higher, it will have to wait awhile for the ability to be ready.
Time Use is the cooldown duration itself, again in seconds.
Autocasting units without a Validator to [i]prevent[/i] them from Autocasting will use the ability immediately every time it is ready to be used. Use a Validator (let's say something like "Enemies Nearby") to limit their autocasting to only when certain conditions are met. They don't need to be told whether or not it's in cooldown; they know that instinctively.