Create a dummy effect in the data editor that does nothing (A modify unit or damage effect should do)
Make an ability of type "Effect - Instant" and set it's effect to the one you just created. Modify the Cost field if you want to give it a cost/cooldown.
Have the trigger fire from the event "effect is used" (or something similar like that) and specify that dummy effect, then run the trigger actions you want. To find the player that the effect belong to, use "Owner of unit (Triggering Effect Unit (Caster))"
What is the easiest way to spawn a unit at a point when an ability is activated?
Example: I click on a gateway and activate the ability 'spawn stalker'. A stalker then appears at point 'Player spawns units'.
Thanks! (;
Create a dummy effect in the data editor that does nothing (A modify unit or damage effect should do)
Make an ability of type "Effect - Instant" and set it's effect to the one you just created. Modify the Cost field if you want to give it a cost/cooldown.
Have the trigger fire from the event "effect is used" (or something similar like that) and specify that dummy effect, then run the trigger actions you want. To find the player that the effect belong to, use "Owner of unit (Triggering Effect Unit (Caster))"
That should work :)
@TheAlmaity: Go
Thanks, I'll try it out
Trigger is set up like this:
Event:
Unit - Gateway [33.50, 83.50] uses Zealotspawn at Generic1 - Any stage (Ignore shared abilities)
Action:
Unit - Create 1 Zealot for player 1 at Team 1 spawn 1 using default facing (No Options)
Unit - Create 1 Zealot for player 1 at Team 1 spawn 2 using default facing (No Options)
Zealotspawn is an ability that activated the dummy effect, that does nothing. Still, it spawns 7 zealots. The trigger is run 7 times, for some reason.
Here's the debug
00:00:00.00 Running gt_MeleeInitialization_Func (Event: Map Initialization)
00:00:03.44 Running gt_Zealottrainedplayer1_Func (Event: Unit Ability (Gateway, ZealotspawnITY, -3))
00:00:03.44 Running gt_Zealottrainedplayer1_Func (Event: Unit Ability (Gateway, ZealotspawnITY, 0))
00:00:03.44 Running gt_Zealottrainedplayer1_Func (Event: Unit Ability (Gateway, ZealotspawnITY, 1))
00:00:03.44 Running gt_Zealottrainedplayer1_Func (Event: Unit Ability (Gateway, ZealotspawnITY, 2))
00:00:03.44 Running gt_Zealottrainedplayer1_Func (Event: Unit Ability (Gateway, ZealotspawnITY, 3))
00:00:03.44 Running gt_Zealottrainedplayer1_Func (Event: Unit Ability (Gateway, ZealotspawnITY, 4))
00:00:03.44 Running gt_Zealottrainedplayer1_Func (Event: Unit Ability (Gateway, ZealotspawnITY, -6))
Does it have anything to do with the 'Generic1'?
Don't set it as Generic1 - Any. It will spawn a Zealot for each ability phase =P
Use the Effect Finish, Channel, Cast; events. or the Generic1 Complete. Just not 'Any'.
Thanks (;