HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Move Region -- Why Won't This Work?

07-17-2002, 02:31 AM#1
Guest
Hey all

I'm working on a map and need a region to follow a unit (actually, a point). I picked the obvious "move region" action, with no conditions, and no events. This should work all the time, correct? Such that WHENEVER the point moves the region does also?

Well, apparently not. I am sure the point the region is supposed to move to is correct, but it wont move; it just stays at the starting point. And before any questions come up, yes, the region is a variable.

So the question: how can I move a region, centered on a point? Is there a bug in this trigger maybe or am I missing something obvious?

Thanks in advance

Peon
07-17-2002, 03:39 AM#2
Guest
Event:
Time - periodic Event
every 2 seconds <that should be fine, or just go with 1>
07-17-2002, 03:42 AM#3
Panimu
Could even offset position of newly created region to be a little in front of direction faced?

Idea being that if the unit is on the move this will help predict where he's going to be inbetween refresh cycles.
07-17-2002, 05:15 AM#4
Guest
Anathema: Thanks, I just tried it, but it still doesn't work. I don't understand it at all. I even have it setup now such that every two seconds, the region will follow a unit, a unit that already exists on the map, no less. Here's what I have:

Events - Every two seconds of game time

Actions- Region : Center RegionA on (Position of UnitB)

Perhaps the way I created the region is the problem? I simply went to the region palette and drew where I wanted the region to start. It's selectable as a variable, but maybe that's the problem? I dunno.

On a sidenote... wouldn't you guys like to see a debugger for the WE? Maybe a variable watcher, region watcher, etc...? Not as complex as a "real" program, but it would certainly help, IMO.

Thanks again
07-17-2002, 05:20 AM#5
Panimu
I sometimes add a trigger or action to display various variables to me in game.
07-17-2002, 01:17 PM#6
Guest
I was experiencing exactly the same problem. Region is a variable and still it won't move. I don't know what you need if for, but if you want a region to track a unit in order to do actions whenever another unit approaches the unit with the region around him, use the "unit in range" event instead. At least thats how I fixed it. No regions needed :)
07-17-2002, 04:26 PM#7
Guest
The region IS moving, but it's just that at least for "unit enters region" it is static. I'm convinved that it's a bug with the editor; there is almost no way I was doing it wrong.

But anyway, I tried your suggestion Teup and OMG, I wasted @ least two hours trying to figure out the first idea I had, and yours worked exactly how I wanted. Thanks a bunch :D
07-19-2002, 01:48 AM#8
Guest
You are correct that events will not trigger off a moving "region" similiar to how events cannot generally use any variable.
07-19-2002, 02:21 AM#9
Guest
Yeah I noticed that too. It's really strange, I don't know why we can't use (some?) variables with event triggers. Makes you have to figure out some roundabout way that's a lot less convienent :| Aren't arrays type int only as well (I haven't tried them at all, but someone mention that)? Seems like an oversight on Bliz's part, IMO.
07-19-2002, 08:33 PM#10
Guest
Well one of my custom unit ideas involved making a cleric with a

holy symbol. And whenever he would click on this holy symbol it

would damage all the undead units in cleric region wich would

follow the cleric around. Will this work?
07-19-2002, 09:03 PM#11
Panimu
One immediate thought is why have it follow him around? Why not invoke it to the current location when the holy symbol is used? Less processing I'd have thought.
07-19-2002, 09:03 PM#12
Guest
Quote:
Originally posted by Jereome
Well one of my custom unit ideas involved making a cleric with a

holy symbol. And whenever he would click on this holy symbol it

would damage all the undead units in cleric region wich would

follow the cleric around. Will this work?

You'll have to use a 'unit in range' event with a 'set variable' action. The variable is a unit(group), the undead unit that activates the trigger will be (added to that group/be the unit the variable refers to).
The trigger to damage the units should apply to that unit(group) you made with that 'unit in range' trigger.
07-19-2002, 09:04 PM#13
Guest
Quote:
Originally posted by Panimu
One immediate thought is why have it follow him around? Why not invoke it to the current location when the holy symbol is used? Less processing I'd have thought.
Exactly, and besides, triggers wil NOT work without at least one event.