[Solved] Possible fixes for this:

Status
Not open for further replies.
Please post the triggers alongside with the map next time!

The issue is in the "Build Start" and "LH Setup" trigger:
  • Set LH_PointSourceSet = BuildSys_TempLoc
  • Set LH_PointTargetSet = BuildSys_TempLoc2
  • Trigger - Run LH Build <gen> (ignoring conditions)
  • Custom script: call RemoveLocation(udg_BuildSys_TempLoc)
  • Custom script: call RemoveLocation(udg_BuildSys_TempLoc2)

  • Set LH_PointSource[LH_MaxIndex] = LH_PointSourceSet
  • Set LH_PointTarget[LH_MaxIndex] = LH_PointTargetSet
  • Trigger - Turn on LH Loop <gen>

He removes the location handle of TempLoc and TempLoc2, thus PointSourceSet, PointTargetSet, PointSource[], & PointTarget[] lose the handle as well. This is why the lightning always appeared to connect in the middle, the X and Y of the locations were either returning as null or 0.

My suggested fix is to do this on index:
  • Set LH_PointSource[LH_MaxIndex] = (Position of LH_PointSourceSet)
  • Set LH_PointTarget[LH_MaxIndex] = (Position of LH_PointTargetSet)

This should ensure that PointSource[] and PointTarget[] get unique handle ids, so they won't be lost when TempLoc and TempLoc 2 are removed.

Cool system and effects though.
 
Please post the triggers alongside with the map next time!

The issue is in the "Build Start" and "LH Setup" trigger:
  • Set LH_PointSourceSet = BuildSys_TempLoc
  • Set LH_PointTargetSet = BuildSys_TempLoc2
  • Trigger - Run LH Build <gen> (ignoring conditions)
  • Custom script: call RemoveLocation(udg_BuildSys_TempLoc)
  • Custom script: call RemoveLocation(udg_BuildSys_TempLoc2)

  • Set LH_PointSource[LH_MaxIndex] = LH_PointSourceSet
  • Set LH_PointTarget[LH_MaxIndex] = LH_PointTargetSet
  • Trigger - Turn on LH Loop <gen>

He removes the location handle of TempLoc and TempLoc2, thus PointSourceSet, PointTargetSet, PointSource[], & PointTarget[] lose the handle as well. This is why the lightning always appeared to connect in the middle, the X and Y of the locations were either returning as null or 0.

My suggested fix is to do this on index:
  • Set LH_PointSource[LH_MaxIndex] = (Position of LH_PointSourceSet)
  • Set LH_PointTarget[LH_MaxIndex] = (Position of LH_PointTargetSet)

This should ensure that PointSource[] and PointTarget[] get unique handle ids, so they won't be lost when TempLoc and TempLoc 2 are removed.

Cool system and effects though.

where exactly is that which I should fix
 
I know they are two points. I don't understand the issue you have...? Im telling you to cache (Position of Unit), which is a point, into PointSource[] and PointTarget[], which are also points.

EDIT: Baha my mistake. I see what you mean, this is what I meant:
  • Set LH_PointSource[LH_MaxIndex] = (Position of "UNIT THAT ISSUED BUILD ORDER")
  • Set LH_PointTarget[LH_MaxIndex] = (Position of "STRUCTURE THAT IS BEING BUILT")

I'm not by the computer, so I can't remember the variable names. Something like that though.
 
Last edited:
Explain this please
 

Attachments

  • well....png
    well....png
    115.3 KB · Views: 100
Status
Not open for further replies.
Back
Top