Thursday, April 19, 2012

Multi-autocasting abilities

when a unit has multiple autocast abilities, only one of them can be set to autocasting

Is there a way to make a unit be able to autocast multiple abilities? or any workarounds?

thanks!|||well. by default only one autocast ability can be turned on .

another way is setting all abilities on pasive mode and create some dummycasters.|||Here's an annoying workaround.

Scenario: You want BOB to shoot searing arrow, frost arrow, and black arrow at the same time.

Solution: You'll need 7 abilities and a dummy unit. Give BOB 4 abilities: AutocastAttack, TurnOnSearingArrow, TurnOnFrostArrow, and TurnOnBlackArrow. None of these abilities do anything per se, they're all trigger-driven. BOB always has AutocastAttack on, this is just a way of keeping track of when he actually attacks.

Now, BOB left-clicks TurnOnSearingArrow, he instantly loses the ability and another one called TurnOffSearingArrow takes its place. It looks either the same or similar, whatever. It's just a way of telling your player that whenever he attacks, he can expect a searing arrow to shoot out, too.

Now, BOB attacks a gnoll. BOB fires a normal arrow, and an invisible dummy is created on top of BOB with searing arrow and the dummy attacks the gnoll too. BOB gets excited and clicks TurnOnFrostArrow and TurnOnBlackArrow and attacks the gnoll again. This time BOB fires his normal arrow, and 3 invisible dummies are created on top of BOB that each fire a different arrow at the gnoll.

The here's some pseudo-trigger for what you'd need.


Code:
Event - Unit casts spell AutoCastAttack
Action - If Unit has abilty TurnOffSearingArrow then make a dummy, give the dummy Searing Arrow, and have it attack whatever the Unit is casting his spell on

Event- Unit casts spell TurnOnSearingArrow
Action - Remove TurnOnSearingArrow from casting unit and give him TurnOffSearingArrow (and the reverse)

No comments:

Post a Comment