Ardenian
A
Ardenian
Hello, I would like to add an update for my lightning effects in my Power System.
For some reasons, my approaches to do so heavily bug my system though.
Is it a general Blizzard problem or did I do something wrong ?
This is what I did:
The basic creation is fine, but once I try to update it in the loop, as first action, before anything else:
I did some tests, it is the loop causing the lightning effects to merge.
Basically, once I cast with one generator on a target that already has a generator whit a special effect, the special effect from the first generator merges with the new one in the loop.
What is wrong with it ? I hope the information is sufficient.
For some reasons, my approaches to do so heavily bug my system though.
Is it a general Blizzard problem or did I do something wrong ?
This is what I did:
-
Set PS_TempUnitType = (Unit-type of PS_Generator[PS_TempInteger2])
-
Custom script: set udg_PS_TempInteger = udg_PS_TempUnitType
-
-------- ... --------
-
Custom script: set udg_PS_TempLightningType = LoadStr(udg_Hash_PowerSystem, udg_PS_TempInteger, 0)
-
Blitz - Create a PS_TempLightningType lightning effect from source PS_TempLocOrigin to target PS_TempLocAim
-
Set PS_LightningIndex[PS_TargetMaxIndex] = (Last created lightning effect)
-
Custom script: set udg_PS_X = GetLocationX(udg_PS_TempLocOrigin)
-
Custom script: set udg_PS_Y = GetLocationY(udg_PS_TempLocOrigin)
-
Custom script: set udg_PS_Z = GetLocationZ(udg_PS_TempLocOrigin)
-
Custom script: set udg_PS_X_2 = GetLocationX(udg_PS_TempLocAim)
-
Custom script: set udg_PS_Y_2 = GetLocationY(udg_PS_TempLocAim)
-
Custom script: set udg_PS_Z_2 = GetLocationZ(udg_PS_TempLocAim)
-
Custom script: call MoveLightningEx(udg_PS_LightningIndex[udg_PS_TargetMaxIndex], true, udg_PS_X, udg_PS_Y, udg_PS_Z + 70, udg_PS_X_2, udg_PS_Y_2, udg_PS_Z_2 + 70)
-
For each (Integer PS_TempInteger2) from 1 to PS_SupplierMaxIndex, do (Actions)
-
Loop - Actions
-
For each (Integer PS_TempInteger3) from 1 to PS_TargetMaxIndex, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
'IF'-Conditions
-
(PS_Suppliedtarget[PS_TempInteger3] is in PS_SupplyGroup[PS_TempInteger2]) Equal True
-
-
'THEN'-Actions
-
Set PS_TempLocAim = (Position of PS_Suppliedtarget[PS_TempInteger3])
-
Set PS_TempLocOrigin = (Position of PS_Generator[PS_TempInteger2])
-
Custom script: set udg_PS_X = GetLocationX(udg_PS_TempLocOrigin)
-
Custom script: set udg_PS_Y = GetLocationY(udg_PS_TempLocOrigin)
-
Custom script: set udg_PS_Z = GetLocationZ(udg_PS_TempLocOrigin)
-
Custom script: set udg_PS_X_2 = GetLocationX(udg_PS_TempLocAim)
-
Custom script: set udg_PS_Y_2 = GetLocationY(udg_PS_TempLocAim)
-
Custom script: set udg_PS_Z_2 = GetLocationZ(udg_PS_TempLocAim)
-
Custom script: call MoveLightningEx(udg_PS_LightningIndex[udg_PS_TempInteger3], true, udg_PS_X, udg_PS_Y, udg_PS_Z + 70, udg_PS_X_2, udg_PS_Y_2, udg_PS_Z_2 + 70)
-
-
'ELSE'-Aktionen
-
-
-
-
-
I did some tests, it is the loop causing the lightning effects to merge.
Basically, once I cast with one generator on a target that already has a generator whit a special effect, the special effect from the first generator merges with the new one in the loop.
What is wrong with it ? I hope the information is sufficient.
Last edited by a moderator: