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

Moving Regions

Status
Not open for further replies.
Level 3
Joined
Sep 10, 2012
Messages
39
I'm well aware that using the Region - Move trigger action doesn't actually move the region, or only moves part of it, or something, so I was wondering if anyone could tell me how to actually move the region to where I need it to go or if they could point out a tutorial that would explain it for me.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
You cannot move a region. You can only alter the area of the region by adding or removing cells.

You can move rects. Rects can be used to modify the area of a region many cells at a time. If your region is based on the area of a rect (like GUI does for event regions) then you can simulate a region move in theory. You use the rect to clear all the cells it added to a region, move the rect and then add the cells that make up the rect to the region.

JASS:
native RegionAddCell takes region whichRegion,real x,real y returns nothing
native RegionAddCellAtLoc takes region whichRegion,location whichLocation returns nothing
native RegionAddRect takes region whichRegion,rect r returns nothing
native RegionClearCell takes region whichRegion,real x,real y returns nothing
native RegionClearCellAtLoc takes region whichRegion,location whichLocation returns nothing
native RegionClearRect takes region whichRegion,rect r returns nothing
 
Level 3
Joined
Sep 10, 2012
Messages
39
My intent was to create a spell that, when cast, created a weather effect around the caster as part of the SFX. Region-Move/Center/etc. has never worked for me. I've read that in several places that it moves the interior of the region (or something like that, I don't remember exactly) but not the boundaries, which are what are used for triggers. Unless I'm misinformed or I'm doing something wrong.
 
Status
Not open for further replies.
Top