• 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!

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