How to WorldBounds

Status
Not open for further replies.
  • Custom script: if GetLocationX(udg_Orbit_loc2) > WorldBounds.maxX then
  • Custom script: call SetUnitX(udg_Orbit_orbiter, WorldBounds.maxX)
  • Custom script: else
  • Custom script: if GetLocationX(udg_Orbit_loc2) < WorldBounds.minX then
  • Custom script: call SetUnitX(udg_Orbit_orbiter, WorldBounds.minX)
  • Custom script: else
  • Custom script: call SetUnitX(udg_Orbit_orbiter, GetLocationX(udg_Orbit_loc2))
  • Custom script: endif
  • Custom script: endif
  • Custom script: if GetLocationY(udg_Orbit_loc2) > WorldBounds.maxY then
  • Custom script: call SetUnitY(udg_Orbit_orbiter, WorldBounds.maxY)
  • Custom script: else
  • Custom script: if GetLocationY(udg_Orbit_loc2) < WorldBounds.minY then
  • Custom script: call SetUnitY(udg_Orbit_orbiter, WorldBounds.minY)
  • Custom script: else
  • Custom script: call SetUnitY(udg_Orbit_orbiter, GetLocationY(udg_Orbit_loc2))
  • Custom script: endif
  • Custom script: endif
Am I doing this right??? Is that how you're supposed to use WorldBounds? I figured I'd compare the values to it's min/max X and Y and set the X and Y to the WorldBounds values if they're beyond them.
 
Status
Not open for further replies.
Back
Top