I want to create a spell much like frozen orb from the diablo 2 sorceres spell. So you spawn an orb from which 10 icycles (ice spikes) spawn each in its own angle making it a full 360 degress. Each spike will then move on its own path damaing enemies (I know i haven't added condition for that in the trigger). I have made the spell now I'm having only one problem. How do I add a small "pause" between the movement start of each spike. I don't want them to start going all at the same time. I want them to have like 0.33 seconds pause between each other.
The summoned orb (first sumoned unit) it's not moving like in diablo2. its just stationary effect. The spikes are the only thing that is moving.
Trigger:
- Ice Spikes Init
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Fire Ball
- Actions
- Set FrostSpikes = 0
- Set IceSpikeCaster = (Casting unit)
- Set IceSpikePoint = (Target point of ability being cast)
- Set IceSpikesCasterPos = (Position of (Casting unit))
- Unit - Create 1 Fire Ball Unit for (Owner of (Casting unit)) at IceSpikePoint facing Default building facing degrees
- Set IceSpikesStartingUnit = (Last created unit)
- Set IceSpikeOffsetPoint = IceSpikePoint
- Set IceSpikeAngle = (Angle from IceSpikesCasterPos to IceSpikePoint)
- Set IceSpikesOffsetAngle = (IceSpikeAngle - 72.00)
- Set IceSpikeOffsetPoint = (IceSpikePoint offset by 200.00 towards IceSpikesOffsetAngle degrees)
- Custom script: call RemoveLocation (udg_IceSpikesCasterPos)
- For each (Integer A) from 1 to 10, do (Actions)
- Loop - Actions
- Set IceSpikesOffsetAngle = (IceSpikesOffsetAngle + 36.00)
- Unit - Create 1 Footman for (Owner of IceSpikeCaster) at IceSpikeOffsetPoint facing (IceSpikesOffsetAngle - 36.00) degrees
- Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
- Set IceSpikesUnit[(Integer A)] = (Last created unit)
- Set IceSpikePosition[(Integer A)] = (Position of IceSpikesUnit[(Integer A)])
- Set IceSpikeOffsetPoint = (IceSpikePoint offset by 200.00 towards IceSpikesOffsetAngle degrees)
- Set IceSpikeUnitAngle[(Integer A)] = (Angle from (Position of IceSpikesStartingUnit) to (Position of IceSpikesUnit[(Integer A)]))
- Unit Group - Add (Last created unit) to Unit Group
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Integer A) Equal to 10
- Then - Actions
- Trigger - Turn on Ice Spikes Creation <gen>
- Game - Display to (All players) the text: Napravljeni su poci...
- Else - Actions
Trigger:
- Ice Spikes Creation
- Events
- Time - Every 0.03 seconds of game time
- Conditions
- Actions
- For each (Integer A) from 1 to 10, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (IceSpikesUnit[(Integer A)] is alive) Equal to True
- Then - Actions
- Unit - Move IceSpikesUnit[(Integer A)] instantly to IceSpikePosition[(Integer A)]
- Set IceSpikeGroup[(Integer A)] = (Units within 150.00 of IceSpikePosition[(Integer A)])
- Unit Group - Pick every unit in IceSpikeGroup[(Integer A)] and do (Actions)
- Loop - Actions
- Unit - Cause IceSpikeCaster to damage (Picked unit), dealing 20.00 damage of attack type Spells and damage type Normal
- Set IceSpikePosition[(Integer A)] = (IceSpikePosition[(Integer A)] offset by 10.00 towards IceSpikeUnitAngle[(Integer A)] degrees)
- Custom script: call DestroGroup (udg_IceSpikeGroup[GetForLoopIndexA()])
- Else - Actions
- Game - Display to (All players) the text: Trigger ugasen
- Trigger - Turn off (This trigger)
- Custom script: call RemoveLocation (udg_IceSpikePosition[GetForLoopIndexA()])
The summoned orb (first sumoned unit) it's not moving like in diablo2. its just stationary effect. The spikes are the only thing that is moving.