HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Making a region follow a unit having trouble

03-20-2004, 12:23 AM#1
stormlegacy
i don't know why but the region won't follow the unit i want it to, could someone help me?
03-20-2004, 06:48 AM#2
Lami
Quote:
Originally Posted by stormlegacy
i don't know why but the region won't follow the unit i want it to, could someone help me?

Event:
Every .5 seconds

Conditions:
None

Actions:
Region-Move (region) to position of (unit)

I dont know why u want the region to move to the unit, yo can do alota triggers useing the unit its self as a region, kinda...
03-20-2004, 03:25 PM#3
stormlegacy
ive already done that exact same trigger and it won't work, region stays in the same place.
03-20-2004, 03:29 PM#4
Vexorian
That is because when you register a rect enter/ leave event it makes the trigger keep the current position of the rect, so if you move the rect later , the trigger will still use the same previus rect, so you need to use another way to detect when a unit comes close to a unit (probably that specific event: Unit within range)
03-20-2004, 03:36 PM#5
Ligature
Just some quick debugging issues:

1. Add a Game - Text action in your trigger to make sure it's working the way you think it is. (It will fill the left half of the screen but at least you'll know the darn thing is firing.)

2. How are you detecting that the region isn't moving? If you're doing it via a "Unit enters region" trigger, that may be the problem: I think if a region is moved so it happens to contain a unit (where it didn't before) it doesn't register that unit as having entered. Blizz probably coded it to register when existing units cross the boundaries of a region; since the unit doesn't cross the boundary, no trigger. Just a theory.

Anyway good hunting; hope this helps!


EDIT: Ooops - looks like Vex has the answer. Don't listen to me, I'm only a combination of letterforms.
03-21-2004, 04:22 AM#6
kane635
There is no need to do this. Tell me what the situation is used for so we can "walk around" the focusing region on a unit problem. You should never really have to.