The title might be a little misleading.
I want to create am ability which is actually 2 abilities;
1st ability launches a missile to a targeted location.
When the missile lands I want to activate the 2nd ability (And the ability should be greyed out/being casted while the missile is traveling) hiding the 1st ability showing the 2nd.
2nd ability calls the missile back to the caster.
Any suggestions on how to do this? (Both the greying out of the ability untill impact and the returning of the missile)
Gridlock TD : Elements
You apply a buff to the caster upon using the first ability, I'll call it "Mfired", and another one once the missile arrives ("Mhit"), and remove both on a timer and/or upon casting the second ability.
Now you just need to get your Requirement logic right:
I don't remember in which order to put the buttons or whether it matters at all, but that's easy to check. If having the launch ability on top fails you need an additional Show type requirement on the retraction ability that checks Mfired>0 to hide that button.
These buffs can also be used for an easy timeout system (which most abilities in League Of Legends have, so you might want that)
Ok, thanks for the ability swapping :) Dont know why I didnt think of that, pretty simple now that you mention it :b
I still got a problem though, how do I make a missile launch from the location of the first ability? Would I have to use triggers for that?
You apply a buff to the caster unit during the first ability with the Effect-Final field starting the retraction sequence, this allows you to preserve the scope, i.e. use Ability1-LaunchMissile-TargetPoint as an effect offset. Then you just remove the buff through the second ability.
This has the main strength of working for multiple units using the same ability, but it won't work if there's an aimed component to the second ability (like making the missile attack a second target, as opposed to returning to the caster or striking the first target a second time); in that case you'll probably need to spawn a dummy unit at the impact location and make the second ability run a search for the dummy, this has the disadvantage of being limited to 1 instance per player unless someone's developed a unique identifier system I haven't seen yet.
You must login to post a comment. Don't have an account? Register to get one!