- Joined
- Nov 28, 2008
- Messages
- 704
I'm trying to create a simple "location" spell for a map. I am using a camera centered one one unit, and the minimap is hidden for various reasons. Thus, it seemed to be mt he best way to detect and find other units would be to create a lightning from the caster to the other units in the map.
What I have works perfectly, except I''m sort of worried about using an AddLightning() inside of a GetLocalPlayer() block.
Would this desync? It didn't seem to in my tests.
Should I be using inside the GetLocalPlayer block just setting a string to "CLPB", then creating the lightning out of it?
What I have works perfectly, except I''m sort of worried about using an AddLightning() inside of a GetLocalPlayer() block.
Would this desync? It didn't seem to in my tests.
JASS:
if GetLocalPlayer() == ID then
set Ray[i] = AddLightning("CLPB", false, GetUnitX(Caster), GetUnitY(Caster), GetUnitX(Unit), GetUnitY(Unit))
call SetLightningColor(Ray[i], ColorCodesRed[Target], ColorCodesGreen[Target], ColorCodesBlue[Target], 230)
endif
Should I be using inside the GetLocalPlayer block just setting a string to "CLPB", then creating the lightning out of it?