• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

[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.
 
Level 12
Joined
Dec 25, 2010
Messages
972
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:
Level 12
Joined
Dec 25, 2010
Messages
972
Explain this please
 

Attachments

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