So I'm trying to make a rather complex (or so I think :p) ability. The basic idea is that the unit with the ability searches in a radius around it, but only inside an angle depending on its attribute points (don't ask). Whichever unit inside that wedge has the largest amount of energy, the ability is cast on.
So far, I've gotten the ability to be auto-cast type, and I can control it manually. However:
- I can't get it to auto-cast, even just letting it target any unit in range. I think it's my validator, but I've had no success playing around with it. I'm not sure what the 'Other Unit' or the 'Unit' values need to be set to (Caster, Target, etc.). I think I've tried every combination, without no luck.
- I don't know how to implement a feature that would let me search for the unit with the highest energy. I think it involves a "search" ability, but after looking at it I feel quite lost.
- I REALLY don't know how to make the search angle depend on unit attribute points.
Any help?
Thanks!
WIthout posting what your validator looks like we wouldn't be able to help you on that front, but suffice you'd be more looking for some sort of target sort then a validator really to find the best target among the bunch to anti-energy, the validator would only have to first check if the unit is capable of having energy really. Now I've got no experience with target sorting but I'm sure there are a few example in the existing blizzard assets you could draw from.
The angle dependent on attributes you could kinda hack by having several various of this effect that remove & apply themselves as the attributes are adjusted as a broad plan perhaps.
@BumpInTheNight:
I'm not even sure if I need a validator, it just seemed to be the "thing to do". Do you know of any examples? Because I couldn't think of any...
Thanks
@KrayzBlu:
On further contemplation, it can't be the validator since I can run the ability manually. The 'Other Unit' or the 'Unit' values that I mentioned in my first post are part of the Ability's setting.
Hrm, again I've never done this but I've worked with a lot of effects and I've noticed a field in search effects called sorts, and I'm guessing if your effect has a limited number of targets you could use that sort to ensure the most favourable of the available targets are picked for the effect's effect. I'd start by looking further into that and see if there are any examples of search effects where that area is filled out.
Untitled Trigger 001
Events
Local Variables
Unit group = (Empty unit group) <Unit Group>
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Number of Living units in Unit group) > 1
Then
Unit Group - Pick each unit in (Last created units) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
((Unit 1 from Unit group) Energy (Current)) > ((Picked unit) Energy (Current))
Then
Unit Group - Remove (Picked unit) from Unit group
Else
Else
Now you have 1 unit in the unit group, the one with the highest energy value
From here, put a behavior on the unit, or use an abilit on the unit to complete the job
If you get out of the data editor for the verification part of it, you should be able to get your unit singled out.
Now you will just need to either get a variable search area worked out, or a search area made for each attribute value (probably what youll have to do)
oh here we go, check out the effect 'medivac - heal search', its the function that picks which unit a medivac is going to heal and it uses sorts to accomplish that. Mimicing that and changing any reference of health to energy and then aiming for the highest instead of lowest outta let you still do it all in the data editor.
@KrayzBlu:
Okay, so after trying the medivac ability, and seeing how hopelessly complicated it was, I decided to go with the good old "Medic - Heal" ability - which was one ability, one validator, and one effect. I pretty much copied the ability and the validator, keeping the same effect as I had before (because it worked).
However, now when I try to active the ability, the button lights up as if it's being activated..... and doesn't actually do anything. It just stays lit up, apparently without calling the effect. I've turned off every "channel" checkbox I could find, but still no luck. Does anyone know what I might be missing?
Thanks!
On further contemplation, the only time I've seen an ability button light up like that before and not activate is when the caster is travelling to the cast destination. Does anyone know what the "Follow Range" number does in the Ability's Stat's tab?
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
So far, I've gotten the ability to be auto-cast type, and I can control it manually. However:
- I can't get it to auto-cast, even just letting it target any unit in range. I think it's my validator, but I've had no success playing around with it. I'm not sure what the 'Other Unit' or the 'Unit' values need to be set to (Caster, Target, etc.). I think I've tried every combination, without no luck.
- I don't know how to implement a feature that would let me search for the unit with the highest energy. I think it involves a "search" ability, but after looking at it I feel quite lost.
- I REALLY don't know how to make the search angle depend on unit attribute points.
Any help? Thanks!
@KrayzBlu: Go
WIthout posting what your validator looks like we wouldn't be able to help you on that front, but suffice you'd be more looking for some sort of target sort then a validator really to find the best target among the bunch to anti-energy, the validator would only have to first check if the unit is capable of having energy really. Now I've got no experience with target sorting but I'm sure there are a few example in the existing blizzard assets you could draw from.
The angle dependent on attributes you could kinda hack by having several various of this effect that remove & apply themselves as the attributes are adjusted as a broad plan perhaps.
Hrm, again I've never done this but I've worked with a lot of effects and I've noticed a field in search effects called sorts, and I'm guessing if your effect has a limited number of targets you could use that sort to ensure the most favourable of the available targets are picked for the effect's effect. I'd start by looking further into that and see if there are any examples of search effects where that area is filled out.
@KrayzBlu
Well here is what im thinking.
Untitled Trigger 001
Events
Local Variables
Unit group = (Empty unit group) <Unit Group>
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Number of Living units in Unit group) > 1
Then
Unit Group - Pick each unit in (Last created units) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
((Unit 1 from Unit group) Energy (Current)) > ((Picked unit) Energy (Current))
Then
Unit Group - Remove (Picked unit) from Unit group
Else
Else
Now you have 1 unit in the unit group, the one with the highest energy value
From here, put a behavior on the unit, or use an abilit on the unit to complete the job
If you get out of the data editor for the verification part of it, you should be able to get your unit singled out.
Now you will just need to either get a variable search area worked out, or a search area made for each attribute value (probably what youll have to do)
@coronbale: Go
If someone could tell me how to properly post a trigger text in there without it doing that, i would be happy to repost it
nm got it
oh here we go, check out the effect 'medivac - heal search', its the function that picks which unit a medivac is going to heal and it uses sorts to accomplish that. Mimicing that and changing any reference of health to energy and then aiming for the highest instead of lowest outta let you still do it all in the data editor.
However, now when I try to active the ability, the button lights up as if it's being activated..... and doesn't actually do anything. It just stays lit up, apparently without calling the effect. I've turned off every "channel" checkbox I could find, but still no luck. Does anyone know what I might be missing?
Thanks!