• 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.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! Click here to post your idea!

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.
Top