HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How do you move regions?

08-05-2005, 02:17 PM#1
Kalvorod
I want to move a region, and have when a unit enters it something happens, and it moves the region again.

Only problem is it never changes. I tried using a variable for region, but I can't call "When a unit enters (regionvaraible)" I can only call "When a unit enters (region)" >_<

There must be a way to move regions AND call them, but it seems that I can't find how. Any ideas?


By the way this isn't all that important for my map, I could work a way around it, but I'd rather not, because when I do enter the origional region the scripts work. It just doesn't move and that's the problem.
08-05-2005, 04:01 PM#2
Vexorian
First what you call regions are actually rects, things that can only be rectangles, regions might have anyu shape (I will thank blizzard for this confusion)

Second, when you register a rect enter/leave event, it uses a dummy function that Creates a new region then adds the rect to the region and Registers the enter/leave event for the region.

Any ways, when you move a rect, the other create region that is used by the even won't change at all.

So you would have to use JASS, and create the region your self and just change the region later.

In case you don't mind your map to have memory leaks (and lag) the gui solution would be adding the rect enter/leave event to the trigger each time you move it
08-05-2005, 04:52 PM#3
Kalvorod
No thank you. I'll just make a dummy unit and use that to represent the region (when you comes within 256 of (dummy) )

Much easier. It creates a problem of pinging it's position when attacked(even though it is invinsible...) but I can fix that by changing what player controls it.
08-05-2005, 05:04 PM#4
Vexorian
I would suggest that, but I didn't know if you only needed enter (cause there is no Out of range event for units just enters range)
08-14-2005, 08:01 PM#5
Kalvorod
That's a good point, but no, all I need is enter.

BTW: I have invinisble towers guarding a town, and it pings when an the computer tries to target them(they are invinsible so they aren't actually getting attacked). Any idea how to stop this?