- Joined
- Jul 9, 2012
- Messages
- 159
Lightning and more lightning! - SOLVED!
SOLVED
Hello guys!
I'm experimenting a bit with lightning. And I can't make this trigger working.
In my map a pillar is holding on to 4 fleeing captives, with a lightning beam for each unit, while they try to flee. The triggers aren't showing any error messages but I can't see the lightnings.
I think I have missed something?
Thank you!
SOLVED
Hello guys!
I'm experimenting a bit with lightning. And I can't make this trigger working.
In my map a pillar is holding on to 4 fleeing captives, with a lightning beam for each unit, while they try to flee. The triggers aren't showing any error messages but I can't see the lightnings.
I think I have missed something?
-
Panicked Captives Initialization
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Set PCUnit[1] = Panicked Captive 0047 <gen>
-
Set PCUnit[2] = Panicked Captive 0046 <gen>
-
Set PCUnit[3] = Panicked Captive 0049 <gen>
-
Set PCUnit[4] = Panicked Captive 0048 <gen>
-
Set PCRegion[1] = PanickedCaptive1 <gen>
-
Set PCRegion[2] = PanickedCaptive2 <gen>
-
Set PCRegion[3] = PanickedCaptive3 <gen>
-
Set PCRegion[4] = PanickedCaptive4 <gen>
-
For each (Integer PCI) from 1 to 4, do (Actions)
-
Loop - Actions
-
Unit Group - Add PCUnit[PCI] to PC_UG
-
Set PCPP[PCI] = (Center of PCRegion[PCI])
-
Set PCP[PCI] = (Position of PCUnit[PCI])
-
Custom script: set udg_PCL[udg_PCI] = AddLightningEx("DRAM", true, GetLocationX(udg_PCPP[udg_PCI]), GetLocationY(udg_PCPP[udg_PCI]), GetLocationZ(udg_PCPP[udg_PCI]) + 100, GetLocationX(udg_PCP[udg_PCI]), GetLocationY(udg_PCP[udg_PCI]), GetLocationZ(udg_PCP[udg_PCI]) + 70)
-
Set PCRunPoint[PCI] = (PCP[PCI] offset by 500.00 towards (Facing of PCUnit[PCI]) degrees)
-
Unit - Order PCUnit[PCI] to Move To PCRunPoint[PCI]
-
Custom script: call RemoveLocation(udg_PCP[udg_PCI])
-
Custom script: call RemoveLocation(udg_PCRunPoint[udg_PCI])
-
-
-
Trigger - Turn on Panicked Captives Loop <gen>
-
-
-
Panicked Captives Loop
-
Events
-
Time - Every 0.05 seconds of game time
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(All units of PC_UG are dead) Equal to False
-
-
Then - Actions
-
For each (Integer PCI) from 1 to 4, do (Actions)
-
Loop - Actions
-
Set PCP[PCI] = (Position of PCUnit[PCI])
-
Set PCMP[PCI] = (PCP[PCI] offset by 11.00 towards (Angle from PCP[PCI] to PCPP[PCI]) degrees)
-
Custom script: call SetUnitX(udg_PCUnit[udg_PCI],GetLocationX(udg_PCMP[udg_PCI]))
-
Custom script: call SetUnitY(udg_PCUnit[udg_PCI],GetLocationY(udg_PCMP[udg_PCI]))
-
Custom script: call MoveLightningEx(udg_PCL[udg_PCI], true , GetLocationX(udg_PCPP[udg_PCI]), GetLocationY(udg_PCPP[udg_PCI]), GetLocationZ(udg_PCPP[udg_PCI]) + 100, GetLocationX(udg_PCMP[udg_PCI]), GetLocationY(udg_PCMP[udg_PCI]), GetLocationZ(udg_PCMP[udg_PCI]) + 70)
-
Custom script: call RemoveLocation(udg_PCP[udg_PCI])
-
Custom script: call RemoveLocation(udg_PCMP[udg_PCI])
-
-
-
-
Else - Actions
-
Trigger - Turn off (This trigger)
-
Custom script: call DestroyGroup(udg_PC_UG)
-
Lightning - Destroy PCL[PCI]
-
For each (Integer PCI) from 1 to 4, do (Actions)
-
Loop - Actions
-
Custom script: call RemoveLocation(udg_PCPP[udg_PCI])
-
-
-
-
-
-
Thank you!
Last edited: