• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[General] [Newb question] Creating units at point of spell being cast

Status
Not open for further replies.
Level 2
Joined
Jan 1, 2020
Messages
8
XjfTHgM.png

This is what I am trying to do:
- Inferno spell creates 1 footman
- After 1 second delay, 4 more footman spawn at the location of the spell target point. (The animation of the inferno raining down from the sky is about 1 sec, so I am trying to align the 4 footman spawn with the 1 footman inferno created)

My issue is, this trigger doesn't work and the 4 foots gets created in the middle of the map. If i remove wait 1 seconds the trigger works. But at the cost of ruining the timing of the unit spawns.

I thought of creating a point variable "SpawnPoint" to remember the spawn point and create the units after 1 seconds. But this won't work since the single variable would be used by 12 players, and if another player uses the spell within the 1 second wait time, the variable would get rewritten.
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
You can also use the two counter trick to make this MUI.
  • Set Count1 = Count1 + 1
  • Set CastPoint[Count1] = (Target point of ability being cast)
  • Wait 4.00 seconds
  • Set Count2 = Count2 + 1
  • Unit - Create 4 footmen ... at CastPoint[Count2] ...
  • Custom script: call RemoveLocation(udg_CastPoint[udg_Count2])
  • If (Conditions) then (actions) else (actions)
    • If - Conditions
      • Count1 equal to Count2
  • Then - Actions
    • Set Count1 = 0
    • Set Count2 = 0
  • Else - Actions
Don’t use Begins Casting, which fires before cooldown and mana cost are applied. Use Starts the Effect instead.
 
Status
Not open for further replies.
Top