- Joined
- Feb 23, 2015
- Messages
- 243
Hi
I made spell for my map. It's similar to teleportation that's used by Adepts in Starcraft. Unit creates immortal image of himself that cannot attack and cast abilities. After some time caster teleports to image's location. Problem is, that when caster casts spell nothing happens. Here are triggers (I hope I translated them correctly):
.
I made spell for my map. It's similar to teleportation that's used by Adepts in Starcraft. Unit creates immortal image of himself that cannot attack and cast abilities. After some time caster teleports to image's location. Problem is, that when caster casts spell nothing happens. Here are triggers (I hope I translated them correctly):
-
SIConfiguration
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
-------- Spell Variable: --------
-
Set SI_Spell = Shadow Image
-
-------- Time to teleportation --------
-
Set SI_Time = 7.00
-
-------- Shadow Image speed multiplier --------
-
Set SI_UnitSpeedMultiplier = 1.25
-
-------- Shadow Image's colouring and transparency (%) --------
-
Set SI_Blue = 100.00
-
Set SI_Green = 50.00
-
Set SI_Red = 30.00
-
Set SI_Transparency = 30.00
-
-------- If Shadow Image is invisible (0=no;1=yes) --------
-
Set IfInvisible = 0
-
-------- If Shadow Image is immortal (0=no;1=yes) --------
-
Set IfImmortal = 1
-
-
-
SICast
-
Events
-
Unit - A unit starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to SI_Spell
-
-
Actions
-
Set SI_Index = (SI_Index + 1)
-
Set SI_Caster[SI_Index] = (Casting unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
SI_Index R Equal to 1
-
-
Then - Akcje
-
Trigger - Turn on SILoop <gen>
-
-
Else - Actions
-
-
-
-
SILoop
-
Events
-
Time - Every 0.10 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer SI_Loop) from 1 to SI_Index, do (Actions)
-
Loop - Actions
-
Set SI_CasterLocation[SI_Loop] = (Position of SI_Caster[SI_Loop])
-
Unit - Create 1 (Unit-type of SI_Caster[SI_Loop]) for (Owner of SI_Caster[SI_Loop]) at SI_CasterLocation[SI_Loop] facing Default building facing degrees
-
Set SI_Unit[SI_Loop] = (Last created unit)
-
Custom script: call RemoveLocation(udg_SI_CasterLocation[udg_SI_Loop])
-
Unit - Turn off supply usage for SI_Unit[SI_Loop]
-
Unit - Set SI_Unit[SI_Loop] movement speed to ((Default movement speed of SI_Unit[SI_Loop]) x SI_UnitSpeedMultiplier)
-
-------- Removes Attack --------
-
Unit - Add NoAttack(SI) to SI_Unit[SI_Loop]
-
-------- Custom Value for turning off abilities --------
-
Unit - Set the custom value of SI_Unit[SI_Loop] to 2
-
Animation - Change SI_Unit[SI_Loop]'s vertex coloring to (SI_Red%, SI_Green%, SI_Blue%) with SI_Transparency% transparency
-
Unit - Turn collision for SI_Unit[SI_Loop] Wył.
-
Unit - Remove SI_Spell from SI_Unit[SI_Loop]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
IfInvisible Equal to 1
-
-
Then - Actions
-
Unit - Add Ghost to SI_Unit[SI_Loop]
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
IfImmortal Equal to 1
-
-
Then - Actions
-
Unit - Make SI_Unit[SI_Loop] Indestructible
-
-
Else - Actions
-
-
Wait SI_Time seconds
-
Set SI_Location[SI_Loop] = (Position of SI_Unit[SI_Loop])
-
Unit - Remove SI_Unit[SI_Loop] from the game
-
Unit - Move SI_Caster[SI_Loop] instantly to SI_Location[SI_Index]
-
Custom script: call RemoveLocation(udg_SI_Location[udg_SI_Loop])
-
Set SI_Index = (SI_Index - 1)
-
Set SI_Loop = (SI_Loop - 1)
-
-
-
-
-
SITurnOffAbilities
-
Events
-
Unit - A unit begins casting an ability
-
-
Conditions
-
(Custom value of (Triggering unit)) Equal to 2
-
-
Actions
-
Unit - Pause (Triggering unit)
-
Unit - Order (Triggering unit) to Stop
-
Unit - Unpause (Triggering unit)
-
-