- Joined
- Mar 27, 2008
- Messages
- 8,035
-
Actions
-
Custom script: local unit Caster = GetTriggerUnit()
-
Custom script: local unit Target = GetSpellTargetUnit()
-
Custom script: local real x1 = GetUnitX(Caster)
-
Custom script: local real y1 = GetUnitY(Caster)
-
Custom script: local real z1 = GetUnitFlyHeight(Caster)
-
Custom script: local real x2 = GetUnitX(Target)
-
Custom script: local real y2 = GetUnitY(Target)
-
Custom script: local real z2 = GetUnitFlyHeight(Target)
-
Set Units[1] = (Triggering unit)
-
Set HandleID = (Key (Triggering unit))
-
Hashtable - Save Handle OfUnits[1] as (Key Puppeteer) of HandleID in Hashtable
-
Unit Group - Add Units[1] to PuppeteerGroup
-
Set Units[2] = (Target unit of ability being cast)
-
Hashtable - Save Handle OfUnits[2] as (Key Puppets) of HandleID in Hashtable
-
Custom script: call AddLightningEx("DRAB", true, x1, y1, z1, x2, y2, z2)
-
Set Lightning = (Last created lightning effect)
-
Hashtable - Save Handle OfLightning as (Key PuppetString) of HandleID in Hashtable
-
Custom script: set Caster = null
-
Custom script: set Target = null
-
Trigger - Turn on PM Loop <gen>
-
set udg_Lightning = bj_lastCreatedLightning
to save data, but to no avail, it fails tooBut, when I turn the AddLightningEx to the normal GUI function of creating lightning, this:
-
Lightning - Create a Chain Lightning - Primary lightning effect from source (Position of (Triggering unit)) to target (Center of (Playable map area))
So, what I'm trying to know/ask is, what is the function that can perform a save data to the Last Created Lightning ?
I think that AddLightning = Lightning - Create Lightning Effect, but AddLightningEx is different thing, right ?
So, what script should I write in order to save the last created lightning data for the AddLightningEx ?