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

Region Variable Help

Status
Not open for further replies.
Level 2
Joined
Apr 14, 2012
Messages
17
I have recently decided to get back into modding Warcraft 3, and have got far in creating my map. But I have encountered a problem with the "Region-Move" command.
I am wanting a region to constantly be centered on a unit; so I created it using a "periodic Event of 1 second", to then center the region "Hero Region" on to the specific unit.
It didn't seem to work so then I tried making a region variable as the "Region-Move" explained it would not work unless the designated region was a variable. I created a region "HeroRegion" and a command that as soon as map initialization commenced the "HeroRegion" variable would be set to equal the region "Hero Region". Still with this I had no success, and could find no tutorial help for this problem.
If you could perhaps offer any ideas on how I could correct this, as I am most likely making a simple, (and most likely stupid), mistake.
Many thanks.
 
Last edited:
Level 26
Joined
Aug 18, 2009
Messages
4,097
Common misunderstanding. The region or better yet rect does get moved but the "Unit enters/leaves region" events do not update because when the event is created, the area of your gui rect is transfered to a newly created jass region and this jass region is actually registered instead.
 
Level 2
Joined
Apr 14, 2012
Messages
17
Common misunderstanding. The region or better yet rect does get moved but the "Unit enters/leaves region" events do not update because when the event is created, the area of your gui rect is transfered to a newly created jass region and this jass region is actually registered instead.
Thanks this helps, do you have any ideas on how to correct this problem, and make it work?
 
Status
Not open for further replies.
Top