• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[Solved] Psionic transfer in Warcraft 3!

Status
Not open for further replies.
Level 3
Joined
Apr 1, 2017
Messages
47
I really want to make a Psionic transfer in Warcraft. Here is the Starcraft 2 description:

Projects an invulnerable psionic image that can move but not attack. After 7 seconds, the adept teleports to the image’s location. The shade may be canceled at any time, and the adept won't teleport.

My first idea was to base it on Blademaster’s mirror image ability.


  • Physical Transfer
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
      • (Unit-type of (Summoning unit)) Equal to Witcher
      • ((Summoned unit) is an illusion) Equal to True
    • Actions
      • Unit - Make (Summoned unit) Invulnerable
      • Wait 6.90 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Summoned unit) is alive) Equal to True
        • Then - Actions
          • Unit - Move (Summoning unit) instantly to (Position of (Summoned unit)), facing (Facing of (Summoned unit)) degrees
          • Unit - Kill (Summoned unit)
        • Else – Actions

But then I realized that that there is no “Can deactivate field” in that ability. Also this trigger stops working after couple of tries and doesn’t work when used by more then 1 unit at the same time. So either I can replace the original ability with “Off” ability or I can base my spell on something like divine shield and do something like that (haven’t tested)


  • Based on Divine Shield
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Physical Transfer
    • Actions
      • Unit - Make (Casting unit) Vulnerable
      • Unit - Create 1 Dummy for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
      • Unit - Make (Last created unit) Invulnerable
      • Unit - Order (Last created unit) to Neutral – {Changed order string} (Casting unit)
      • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
      • Wait 6.90 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Summoned unit) is alive) Equal to True
        • Then - Actions
          • Unit - Move (Summoning unit) instantly to (Position of (Summoned unit)), facing (Facing of (Summoned unit)) degrees
          • Unit - Kill (Summoned unit)
        • Else – Actions

I’m probably doing this completely wrong :p
 
I would not use the waits here, summoned units referenc will not maintain over the wait.

With hashtables, death event, casting/summoning this might be do able:

On some init trigger create an hashtable
Move the Teleporting in an new trigger which has the event death + isIllusion,
Load adept and teleport.​
On Summon connect illusion & adept based on id saving the units:
save Ghost on id of adept and 0.
save adept on id of Ghost and 0.​
if deactivaded dispatch the connection, which would disable teleporting.

you can disable the attacking of the illusion by using this one way attack disable:
  • Set Unit = Illusion
  • Custom script: call UnitRemoveAbility(udg_Unit, 'Aatk')
 
Level 3
Joined
Apr 1, 2017
Messages
47
I would not use the waits here, summoned units referenc will not maintain over the wait.

With hashtables, death event, casting/summoning this might be do able:

On some init trigger create an hashtable
Move the Teleporting in an new trigger which has the event death + isIllusion,
Load adept and teleport.​
On Summon connect illusion & adept based on id saving the units:
save Ghost on id of adept and 0.
save adept on id of Ghost and 0.​
if deactivaded dispatch the connection, which would disable teleporting.

you can disable the attacking of the illusion by using this one way attack disable:
  • Set Unit = Illusion
  • Custom script: call UnitRemoveAbility(udg_Unit, 'Aatk')


So I haven’t yet tried to make hashtables, but after reading tutorials, I made this:


  • Hashtable
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set TeleportHash = (Last created hashtable)

  • Physical Transfer
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
      • (Unit-type of (Summoning unit)) Equal to Witcher
      • ((Summoned unit) is an illusion) Equal to True
    • Actions
      • Set IllusionOfWitcher = (Position of (Summoned unit))
      • Set WitcherIllusion = (Summoning unit)
      • Hashtable - Save Handle OfIllusionOfWitcher as 0 of (Key (Summoned unit)) in TeleportHash
      • Hashtable - Save Handle OfWitcherIllusion as 0 of (Key (Summoning unit)) in TeleportHash
      • Unit - Make (Summoned unit) Invulnerable

  • Physical Transfer Die
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is an illusion) Equal to True
    • Actions
      • Set IllusionOfWitcherLoaded = (Load 0 of (Key (Summoned unit)) in TeleportHash)
      • Set WitcherIllusionLoaded = (Load 0 of (Key (Summoning unit)) in TeleportHash)
      • Unit - Move WitcherIllusionLoaded instantly to IllusionOfWitcher, facing Default building facing degrees

So please say what I did wrong and help me find a better Condition in the last trigger.
Oh, also how do I dispatch connection?
 
Level 13
Joined
May 10, 2009
Messages
868
Both (Summoned Unit) and (Summoning Unit) return nothing (null) in your last trigger, because Unit - A Unit Dies event does not work with those getters; It only works with these: (Killing Unit), (Triggering Unit), and (Dying Unit). So, only one in your ability is referenced by both events, the summoned one (image). You just need to store the summoning unit in the hashtable.

  • Physical Transfer Spawn
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
      • (Unit-type of (Summoning unit)) Equal to Witcher
    • Actions
      • Hashtable - Save Handle Of(Summoning unit) as 0 of (Key (Triggering unit)) in Table
  • Physical Transfer Death
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is an illusion) Equal to True
    • Actions
      • Set point = (Position of (Triggering unit))
      • Unit - Move (Load 0 of (Key (Triggering unit)) in Table) instantly to point, facing (Facing of (Triggering unit)) degrees
      • Custom script: call RemoveLocation(udg_point)
NOTE: (Triggering Unit) might vary depending on the event. For Unit Dies it refers to the (Dying Unit), and for Spawns a summoned unit it refers to the (Summoned Unit).
 
Last edited:
Level 3
Joined
Apr 1, 2017
Messages
47
Both (Summoned Unit) and (Summoning Unit) return nothing (null) in your last trigger, because Unit - A Unit Dies event does not work with those getters; It only works with these: (Killing Unit), (Triggering Unit), and (Dying Unit). So, only one in your ability is referenced by both events, the summoned one (image). You just need to store the summoning unit in the hashtable.

  • Physical Transfer Spawn
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
      • (Unit-type of (Summoning unit)) Equal to Witcher
    • Actions
      • Hashtable - Save Handle Of(Summoning unit) as 0 of (Key (Triggering unit)) in Table
  • Physical Transfer Death
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is an illusion) Equal to True
    • Actions
      • Set point = (Position of (Triggering unit))
      • Unit - Move (Load 0 of (Key (Triggering unit)) in Table) instantly to point, facing (Facing of (Triggering unit)) degrees
      • Custom script: call RemoveLocation(udg_point)
NOTE: (Triggering Unit) might vary depending on the event. For Unit Dies it refers to the (Dying Unit), and for Spawns a summoned unit it refers to the (Summoned Unit).


It does work… But I still need a way to cancel teleportation.
 
Thats why i said connect it both way, you need the connection from adept to illusion to remove it without looping all illusions the player got.

How I would do it.
  • Hash Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtabelle - Create a hashtable
      • Set GhostHash = (Last created hashtable)
Next two will make sure only illusions summoned by this spell will trigger this effect
  • Start summoning
    • Events
      • Unit - An Unit starts the effect of an spell
    • Conditions
      • (Ability being cast) Equal Spirt wlak
    • Actions
      • Einheitengruppe - Add (Triggering unit) to GhostSummoner
  • End summoning
    • Events
      • Unit - An Unit stops casting an spell
    • Conditions
      • (Ability being cast) Equal Spirt wlak
    • Actions
      • Einheitengruppe - Remove (Triggering unit) from GhostSummoner
On Summon remeber summoner for summoned and summoned for summoner.
  • Summon
    • Events
      • Unit - A unit Erzeugt eine beschworene Unit
    • Conditions
      • ((Summoned unit) is an illusion) Equal True
      • ((Summoning unit) is in GhostSummoner) Equal True
    • Actions
      • -------- Connect --------
      • Hashtabelle - Save Handle Of(Summoned unit) as 0 of (Key (Summoning unit)) in GhostHash
      • Hashtabelle - Save Handle Of(Summoning unit) as 0 of (Key (Summoned unit)) in GhostHash
      • -------- Walk trough able, no attack, unattackable --------
      • Unit - Add Geist (sichtbar) to (Summoned unit)
      • Custom script: call UnitRemoveAbility(GetSummonedUnit(), 'Aatk')
      • Unit - Make (Summoned unit) Unverwundbar
      • -------- Some safe way to detect later --------
      • Einheitengruppe - Add (Summoned unit) to PsionicTransfer
If used again or the cancel spell is used cut off the connection for summoned one, which is 0 of triggering unit.
  • Cancle
    • Events
      • Unit - An Unit starts the effect of an spell
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Ability being cast) Equal Cancel
          • (Ability being cast) Equal Spirt wlak
    • Actions
      • -------- Unit is the Ghost --------
      • Set Unit = (Load 0 of (Key (Triggering unit)) in GhostHash)
      • -------- This --------
        • Custom script: set udg_Key = GetHandleId(udg_Unit)
        • Hashtabelle - Clear all child hashtables of child Key in GhostHash
      • -------- or this --------
        • Hashtabelle - Clear all child hashtables of child (Key (Load 0 of (Key (Triggering unit)) in GhostHash)) in GhostHash
      • -------- Than remove the illusion from the detecion and kill it --------
      • Einheitengruppe - Remove Unit from PsionicTransfer
      • Unit - Kill Unit
  • Illusion end
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is in PsionicTransfer) Equal True
    • Actions
      • Set Loc = (Position of (Triggering unit))
      • Unit - Move (Load 0 of (Key (Triggering unit)) in GhostHash) instantly to Loc
      • Custom script: call RemoveLocation(udg_Loc)
      • -------- Cleanoff --------
      • Hashtabelle - Clear all child hashtables of child (Key (Triggering unit)) in GhostHash
      • Einheitengruppe - Remove (Triggering unit) from PsionicTransfer

some background information this Triggering unit, summoned unit stuff reference to a unit if used inside an event filling it with data outside of such an event they have no value.
 
Last edited:
Level 5
Joined
Aug 20, 2015
Messages
133
i d rather create a dummy-like unit, that looks like caster, cus illusions acts very weird sometimes
also, u cant add any active ability to it, such as cancel teleportation
and its very hard to catch illusion from one unit, if a lot of units cast it in a small place
 
Level 19
Joined
Jul 2, 2011
Messages
2,162
simple solution

use that brew master panda bears ability to transform into 4 different versions of himself. change it around a bit so that it reflects an exact duplicate of the user. you can do this in trig by replacing one of the panda with a unit of same type of maintaining statues.

cast banish on this new panda clone

when the panda expires all available pandas fuse together again to recreate the original unit that cast it. this would mean that your character would magically be teleported to the only remaining image of himself.

done!

sorry if my explination makes no sense. I'll make this spell when I get back home. cheers
 
Level 3
Joined
Apr 1, 2017
Messages
47
simple solution

use that brew master panda bears ability to transform into 4 different versions of himself. change it around a bit so that it reflects an exact duplicate of the user. you can do this in trig by replacing one of the panda with a unit of same type of maintaining statues.

cast banish on this new panda clone

when the panda expires all available pandas fuse together again to recreate the original unit that cast it. this would mean that your character would magically be teleported to the only remaining image of himself.

done!

sorry if my explination makes no sense. I'll make this spell when I get back home. cheers


And how would I cancel the teleportation then?
 
Level 3
Joined
Apr 1, 2017
Messages
47
Thats why i said connect it both way, you need the connection from adept to illusion to remove it without looping all illusions the player got.

How I would do it.
  • Hash Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtabelle - Create a hashtable
      • Set GhostHash = (Last created hashtable)
Next two will make sure only illusions summoned by this spell will trigger this effect
  • Start summoning
    • Events
      • Unit - An Unit starts the effect of an spell
    • Conditions
      • (Ability being cast) Equal Spirt wlak
    • Actions
      • Einheitengruppe - Add (Triggering unit) to GhostSummoner
  • End summoning
    • Events
      • Unit - An Unit stops casting an spell
    • Conditions
      • (Ability being cast) Equal Spirt wlak
    • Actions
      • Einheitengruppe - Remove (Triggering unit) from GhostSummoner
On Summon remeber summoner for summoned and summoned for summoner.
  • Summon
    • Events
      • Unit - A unit Erzeugt eine beschworene Unit
    • Conditions
      • ((Summoned unit) is an illusion) Equal True
      • ((Summoning unit) is in GhostSummoner) Equal True
    • Actions
      • -------- Connect --------
      • Hashtabelle - Save Handle Of(Summoned unit) as 0 of (Key (Summoning unit)) in GhostHash
      • Hashtabelle - Save Handle Of(Summoning unit) as 0 of (Key (Summoned unit)) in GhostHash
      • -------- Walk trough able, no attack, unattackable --------
      • Unit - Add Geist (sichtbar) to (Summoned unit)
      • Custom script: call UnitRemoveAbility(GetSummonedUnit(), 'Aatk')
      • Unit - Make (Summoned unit) Unverwundbar
      • -------- Some safe way to detect later --------
      • Einheitengruppe - Add (Summoned unit) to PsionicTransfer
If used again or the cancel spell is used cut off the connection for summoned one, which is 0 of triggering unit.
  • Cancle
    • Events
      • Unit - An Unit starts the effect of an spell
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Ability being cast) Equal Cancel
          • (Ability being cast) Equal Spirt wlak
    • Actions
      • -------- Unit is the Ghost --------
      • Set Unit = (Load 0 of (Key (Triggering unit)) in GhostHash)
      • -------- This --------
        • Custom script: set udg_Key = GetHandleId(udg_Unit)
        • Hashtabelle - Clear all child hashtables of child Key in GhostHash
      • -------- or this --------
        • Hashtabelle - Clear all child hashtables of child (Key (Load 0 of (Key (Triggering unit)) in GhostHash)) in GhostHash
      • -------- Than remove the illusion from the detecion and kill it --------
      • Einheitengruppe - Remove Unit from PsionicTransfer
      • Unit - Kill Unit
  • Illusion end
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is in PsionicTransfer) Equal True
    • Actions
      • Set Loc = (Position of (Triggering unit))
      • Unit - Move (Load 0 of (Key (Triggering unit)) in GhostHash) instantly to Loc
      • Custom script: call RemoveLocation(udg_Loc)
      • -------- Cleanoff --------
      • Hashtabelle - Clear all child hashtables of child (Key (Triggering unit)) in GhostHash
      • Einheitengruppe - Remove (Triggering unit) from PsionicTransfer

some background information this Triggering unit, summoned unit stuff reference to a unit if used inside an event filling it with data outside of such an event they have no value.


And what ability would you base it on?
 
Level 3
Joined
Apr 1, 2017
Messages
47
While on the subject of hashtables, I’ve made a simple script with my take on manaburning overtime.

  • Mana Flare Start
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Mana Flare
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Integer((Max mana of (Target unit of ability being cast)))) Greater than 0
        • Then - Actions
          • Set ManaFlareCaster = (Casting unit)
          • Unit Group - Add (Target unit of ability being cast) to ManaFlared
          • Hashtable - Save 10 as 1 of (Key (Target unit of ability being cast)) in ManaFlare
        • Else - Actions
          • Unit - Order (Casting unit) to Stop

  • Mana Flare
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in ManaFlared and do (Actions)
        • Loop - Actions
          • Set Loc1 = (Position of (Picked unit))
          • Set ManaFlareTimer = (Load 1 of (Key (Picked unit)) from ManaFlare)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ManaFlareTimer Greater than 0
            • Then - Actions
              • Unit - Create 1 Dummy Mana Flare for (Owner of ManaFlareCaster) at Loc1 facing Default building facing degrees
              • Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
              • Unit - Order (Last created unit) to Night Elf Demon Hunter - Mana Burn (Picked unit)
              • Hashtable - Save (ManaFlareTimer - 1) as 1 of (Key (Picked unit)) in ManaFlare
            • Else - Actions
              • Unit Group - Remove (Picked unit) from ManaFlared
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in ManaFlare
              • Custom script: call RemoveLocation(udg_Loc1)

Not sure why, but there is a serious lag whenever there are more then 1 targets. Also I’m interested in making this trigger without dummies, but I’m not sure how can I mimic those floating numbers.
 
its good habit to calc (Key (unit) once and saving into an integer variable if you have multiple acceses on one key in one trigger, didn't do that previous sorry for that.
You should draw the loc into the then part.
You might have an not posted Unit Enters playable map trigger.

On my post the summon is based on mirror image and the cancle is an beserk skill both added to the caster. (Had the illusion in mind)

But ssbbssc2 idea is quite good, instead of an illusion an ghost unit could be used allowing the ghost using the cancel instead of both used by the caster and you could give the ghost independent stats (movespeed, sight, movetype, skills, etc)

after watching a video on youtube about this skill in starcraft 2:
You should base the spell on an target location spell like carrion swarm/blizzard/channel spell, In starcraft 2 you can cast it onto a point to sent the ghosts to this locations.
Skill of adept: Carrion Swarm based
Skill of ghost: Berserk based.

New Version:
  • Hash Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set GhostHash = (Last created hashtable)
  • Summon
    • Events
      • Unit - A unit starts the effect of an spell
    • Conditions
      • (Ability being cast) Equal Pyshic Transfer
    • Actions
      • Set Adept = (Triggering unit)
      • Set KeyAdept = (Key (Triggering unit))
      • Set Loc = (Position of Adept)
      • Set Loc2 = (Target point of ability being cast)
      • Unit - Create 1 Ghost for (Triggering player) at Loc facing Loc2
      • Set Ghost = (Last created unit)
      • Set KeyGhost = (Key (Last created unit))
      • Custom script: call RemoveLocation(udg_Loc)
      • Unit - Add a 7.00 second Standard expiration timer to Ghost
      • Unit - Order Ghost to Move to Loc2
      • -------- Connect --------
      • Hashtable - Save Handle OfGhost as 0 of KeyAdept in GhostHash
      • Hashtable - Save Handle OfAdept as 0 of KeyGhost in GhostHash
      • -------- Save TargetPoint for ghost --------
      • Hashtable - Save Handle OfLoc2 as 1 of KeyGhost in GhostHash
      • -------- Some safe way to detect later --------
      • Einheitengruppe - Add Ghost to PsionicTransfer
      • -------- Forget Loc2 it is destroyed Later --------
      • Custom script: set udg_Loc2 = null
  • Cancle
    • Events
      • Unit - A unit starts the effect of an spell
    • Conditions
      • (Ability being cast) Equal Pyshic Transfer: Cancel
    • Actions
      • Set Ghost = (Triggering unit)
      • Set KeyGhost = (Key (Triggering unit))
      • Set Adept = (Load 0 of KeyGhost in GhostHash)
      • Custom script: set udg_KeyAdept = GetHandleId(udg_Adept)
      • Set Loc2 = (Load 1 of KeyGhost in GhostHash)
      • Custom script: call RemoveLocation(udg_Loc2)
      • Hashtable - Clear all child hashtables of child KeyAdept in GhostHash
      • Hashtable - Clear all child hashtables of child KeyGhost in GhostHash
      • -------- Than Dispatch the Ghost and kill it --------
      • Einheitengruppe - Remove Ghost from PsionicTransfer
      • Unit - Kill Ghost
  • Ghost dies
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is in PsionicTransfer) Equal True
    • Actions
      • Set Ghost = (Triggering unit)
      • Set KeyGhost = (Key (Triggering unit))
      • Set Loc = (Position of Ghost)
      • Set Loc2 = (Load 1 of KeyGhost in GhostHash)
      • Set Adept = (Load 0 of KeyGhost in GhostHash)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Adept is alive) Equal True
        • Then - Actions
          • Unit - Move Adept instantly to Loc
          • -------- On the sc2 video the adept got a moving order to the position the ghost was sent to. --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between Loc and Loc2) Greater Equal 100.00
            • Then - Actions
              • Unit - Order Adept to Move to Loc2
            • Else - Actions
        • Else - Actions
      • Custom script: call RemoveLocation(udg_Loc)
      • Custom script: call RemoveLocation(udg_Loc2)
      • -------- Cleanoff --------
      • Hashtable - Clear all child hashtables of child KeyGhost in GhostHash
      • Einheitengruppe - Remove (Triggering unit) from PsionicTransfer
  • Adept dies
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Level of Pyshic Transfer for (Triggering unit)) UnEqual 0
    • Actions
      • Set Ghost = (Load 0 of (Key (Triggering unit)) in GhostHash)
      • Unit - Kill Ghost
Edit: Forgot this one
  • Ghost new Order
    • Events
      • Unit - A unit Gains an point order
    • Conditions
      • ((Triggering unit) is in PsionicTransfer) Equal True
    • Actions
      • Set Ghost = (Triggering unit)
      • Set KeyGhost = (Key (Triggering unit))
      • Set Loc2 = (Load 1 of KeyGhost in GhostHash)
      • Custom script: call RemoveLocation(udg_Loc2)
      • Hashtable - Save Handle Of(Target point of issued order) as 1 of KeyGhost in GhostHash
 

Attachments

  • Pysich tranf.w3x
    23.7 KB · Views: 55
Last edited:
Level 3
Joined
Apr 1, 2017
Messages
47
its good habit to calc (Key (unit) once and saving into an integer variable if you have multiple acceses on one key in one trigger, didn't do that previous sorry for that.
You should draw the loc into the then part.
You might have an not posted Unit Enters playable map trigger.

On my post the summon is based on mirror image and the cancle is an beserk skill both added to the caster. (Had the illusion in mind)

But ssbbssc2 idea is quite good, instead of an illusion an ghost unit could be used allowing the ghost using the cancel instead of both used by the caster and you could give the ghost independent stats (movespeed, sight, movetype, skills, etc)

after watching a video on youtube about this skill in starcraft 2:
You should base the spell on an target location spell like carrion swarm/blizzard/channel spell, In starcraft 2 you can cast it onto a point to sent the ghosts to this locations.
Skill of adept: Carrion Swarm based
Skill of ghost: Berserk based.

New Version:
  • Hash Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set GhostHash = (Last created hashtable)
  • Summon
    • Events
      • Unit - A unit starts the effect of an spell
    • Conditions
      • (Ability being cast) Equal Pyshic Transfer
    • Actions
      • Set Adept = (Triggering unit)
      • Set KeyAdept = (Key (Triggering unit))
      • Set Loc = (Position of Adept)
      • Set Loc2 = (Target point of ability being cast)
      • Unit - Create 1 Ghost for (Triggering player) at Loc facing Loc2
      • Set Ghost = (Last created unit)
      • Set KeyGhost = (Key (Last created unit))
      • Custom script: call RemoveLocation(udg_Loc)
      • Unit - Add a 7.00 second Standard expiration timer to Ghost
      • Unit - Order Ghost to Move to Loc2
      • -------- Connect --------
      • Hashtable - Save Handle OfGhost as 0 of KeyAdept in GhostHash
      • Hashtable - Save Handle OfAdept as 0 of KeyGhost in GhostHash
      • -------- Save TargetPoint for ghost --------
      • Hashtable - Save Handle OfLoc2 as 1 of KeyGhost in GhostHash
      • -------- Some safe way to detect later --------
      • Einheitengruppe - Add Ghost to PsionicTransfer
      • -------- Forget Loc2 it is destroyed Later --------
      • Custom script: set udg_Loc2 = null
  • Cancle
    • Events
      • Unit - A unit starts the effect of an spell
    • Conditions
      • (Ability being cast) Equal Pyshic Transfer: Cancel
    • Actions
      • Set Ghost = (Triggering unit)
      • Set KeyGhost = (Key (Triggering unit))
      • Set Adept = (Load 0 of KeyGhost in GhostHash)
      • Custom script: set udg_KeyAdept = GetHandleId(udg_Adept)
      • Set Loc2 = (Load 1 of KeyGhost in GhostHash)
      • Custom script: call RemoveLocation(udg_Loc2)
      • Hashtable - Clear all child hashtables of child KeyAdept in GhostHash
      • Hashtable - Clear all child hashtables of child KeyGhost in GhostHash
      • -------- Than Dispatch the Ghost and kill it --------
      • Einheitengruppe - Remove Ghost from PsionicTransfer
      • Unit - Kill Ghost
  • Ghost dies
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is in PsionicTransfer) Equal True
    • Actions
      • Set Ghost = (Triggering unit)
      • Set KeyGhost = (Key (Triggering unit))
      • Set Loc = (Position of Ghost)
      • Set Loc2 = (Load 1 of KeyGhost in GhostHash)
      • Set Adept = (Load 0 of KeyGhost in GhostHash)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Adept is alive) Equal True
        • Then - Actions
          • Unit - Move Adept instantly to Loc
          • -------- On the sc2 video the adept got a moving order to the position the ghost was sent to. --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between Loc and Loc2) Greater Equal 100.00
            • Then - Actions
              • Unit - Order Adept to Move to Loc2
            • Else - Actions
        • Else - Actions
      • Custom script: call RemoveLocation(udg_Loc)
      • Custom script: call RemoveLocation(udg_Loc2)
      • -------- Cleanoff --------
      • Hashtable - Clear all child hashtables of child KeyGhost in GhostHash
      • Einheitengruppe - Remove (Triggering unit) from PsionicTransfer
  • Adept dies
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Level of Pyshic Transfer for (Triggering unit)) UnEqual 0
    • Actions
      • Set Ghost = (Load 0 of (Key (Triggering unit)) in GhostHash)
      • Unit - Kill Ghost
Edit: Forgot this one
  • Ghost new Order
    • Events
      • Unit - A unit Gains an point order
    • Conditions
      • ((Triggering unit) is in PsionicTransfer) Equal True
    • Actions
      • Set Ghost = (Triggering unit)
      • Set KeyGhost = (Key (Triggering unit))
      • Set Loc2 = (Load 1 of KeyGhost in GhostHash)
      • Custom script: call RemoveLocation(udg_Loc2)
      • Hashtable - Save Handle Of(Target point of issued order) as 1 of KeyGhost in GhostHash

Is there a good way to make ghost look like a mirror image?
 
Level 3
Joined
Apr 1, 2017
Messages
47
its good habit to calc (Key (unit) once and saving into an integer variable if you have multiple acceses on one key in one trigger, didn't do that previous sorry for that.
You should draw the loc into the then part.
You might have an not posted Unit Enters playable map trigger.

On my post the summon is based on mirror image and the cancle is an beserk skill both added to the caster. (Had the illusion in mind)

But ssbbssc2 idea is quite good, instead of an illusion an ghost unit could be used allowing the ghost using the cancel instead of both used by the caster and you could give the ghost independent stats (movespeed, sight, movetype, skills, etc)

after watching a video on youtube about this skill in starcraft 2:
You should base the spell on an target location spell like carrion swarm/blizzard/channel spell, In starcraft 2 you can cast it onto a point to sent the ghosts to this locations.
Skill of adept: Carrion Swarm based
Skill of ghost: Berserk based.

New Version:
  • Hash Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set GhostHash = (Last created hashtable)
  • Summon
    • Events
      • Unit - A unit starts the effect of an spell
    • Conditions
      • (Ability being cast) Equal Pyshic Transfer
    • Actions
      • Set Adept = (Triggering unit)
      • Set KeyAdept = (Key (Triggering unit))
      • Set Loc = (Position of Adept)
      • Set Loc2 = (Target point of ability being cast)
      • Unit - Create 1 Ghost for (Triggering player) at Loc facing Loc2
      • Set Ghost = (Last created unit)
      • Set KeyGhost = (Key (Last created unit))
      • Custom script: call RemoveLocation(udg_Loc)
      • Unit - Add a 7.00 second Standard expiration timer to Ghost
      • Unit - Order Ghost to Move to Loc2
      • -------- Connect --------
      • Hashtable - Save Handle OfGhost as 0 of KeyAdept in GhostHash
      • Hashtable - Save Handle OfAdept as 0 of KeyGhost in GhostHash
      • -------- Save TargetPoint for ghost --------
      • Hashtable - Save Handle OfLoc2 as 1 of KeyGhost in GhostHash
      • -------- Some safe way to detect later --------
      • Einheitengruppe - Add Ghost to PsionicTransfer
      • -------- Forget Loc2 it is destroyed Later --------
      • Custom script: set udg_Loc2 = null
  • Cancle
    • Events
      • Unit - A unit starts the effect of an spell
    • Conditions
      • (Ability being cast) Equal Pyshic Transfer: Cancel
    • Actions
      • Set Ghost = (Triggering unit)
      • Set KeyGhost = (Key (Triggering unit))
      • Set Adept = (Load 0 of KeyGhost in GhostHash)
      • Custom script: set udg_KeyAdept = GetHandleId(udg_Adept)
      • Set Loc2 = (Load 1 of KeyGhost in GhostHash)
      • Custom script: call RemoveLocation(udg_Loc2)
      • Hashtable - Clear all child hashtables of child KeyAdept in GhostHash
      • Hashtable - Clear all child hashtables of child KeyGhost in GhostHash
      • -------- Than Dispatch the Ghost and kill it --------
      • Einheitengruppe - Remove Ghost from PsionicTransfer
      • Unit - Kill Ghost
  • Ghost dies
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is in PsionicTransfer) Equal True
    • Actions
      • Set Ghost = (Triggering unit)
      • Set KeyGhost = (Key (Triggering unit))
      • Set Loc = (Position of Ghost)
      • Set Loc2 = (Load 1 of KeyGhost in GhostHash)
      • Set Adept = (Load 0 of KeyGhost in GhostHash)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Adept is alive) Equal True
        • Then - Actions
          • Unit - Move Adept instantly to Loc
          • -------- On the sc2 video the adept got a moving order to the position the ghost was sent to. --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between Loc and Loc2) Greater Equal 100.00
            • Then - Actions
              • Unit - Order Adept to Move to Loc2
            • Else - Actions
        • Else - Actions
      • Custom script: call RemoveLocation(udg_Loc)
      • Custom script: call RemoveLocation(udg_Loc2)
      • -------- Cleanoff --------
      • Hashtable - Clear all child hashtables of child KeyGhost in GhostHash
      • Einheitengruppe - Remove (Triggering unit) from PsionicTransfer
  • Adept dies
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Level of Pyshic Transfer for (Triggering unit)) UnEqual 0
    • Actions
      • Set Ghost = (Load 0 of (Key (Triggering unit)) in GhostHash)
      • Unit - Kill Ghost
Edit: Forgot this one
  • Ghost new Order
    • Events
      • Unit - A unit Gains an point order
    • Conditions
      • ((Triggering unit) is in PsionicTransfer) Equal True
    • Actions
      • Set Ghost = (Triggering unit)
      • Set KeyGhost = (Key (Triggering unit))
      • Set Loc2 = (Load 1 of KeyGhost in GhostHash)
      • Custom script: call RemoveLocation(udg_Loc2)
      • Hashtable - Save Handle Of(Target point of issued order) as 1 of KeyGhost in GhostHash


What kind of variable is KeyAdept?
EDIT nevermind I saw the map file :D
 
Last edited:
Status
Not open for further replies.
Top