Moving Regions

WorpeX

New Member
Reaction score
8
I want a region to center it self on a unit which moves, however I can't ever get the region to actually move. How would I go about doing this?

This is my current code, it doesn't work though... :

Code:
Center Region
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Set CameraRegion = CameraRegion <gen>
        Region - Center CameraRegion on (Position of Hawk (Level 1) 0017 <gen>)
 

esb

Because none of us are as cruel as all of us.
Reaction score
329
why don't you save the unit's position(or point) to a variable?
 

elmstfreddie

The Finglonger
Reaction score
203
It's probably a large region and he is setting the camera bounds to that region. Maybe you can just define a region... Or is that only in JASS lol
 

WorpeX

New Member
Reaction score
8
2 points for elmstfreddie! Thats exactly what i was trying to do. Although I dunno what you mean about defining a region.


I need it to follow a unit though, it wont work if i move it to a point.

I KNOW IT WORKS WITH THE STARCRAFT EDITOR!!!
 

elmstfreddie

The Finglonger
Reaction score
203
Conversion - Convert Point With Size To Region
Just set the camera bounds to the position of the unit with a width and height of w/e
 

Sim

Forum Administrator
Staff member
Reaction score
534
Like elmst said, just create your own region around the unit instead of moving a region to its position.
 

a j j bones

New Member
Reaction score
3
i used move regions in one of my triggers and it worked, you gotta preplace a region on map and set it to a variable then move it, it should work :rolleyes:
 

WorpeX

New Member
Reaction score
8
Conversion - Convert Point With Size To Region
Just set the camera bounds to the position of the unit with a width and height of w/e

But that wont work. What im trying to do is when a unit leaves the camera, it dies. So I was trying to get the camera to follow an invisible unit, but when other units leave the screan, they die. I needed the region for the kill trigger, unless their is anouther way to do that?
 

TheCrystal

New Member
Reaction score
36
You need to say more J3LADE
Couldn't you have a camera follow a unit, then have a trigger that moves a region over X and Y?
Edit: Nevermind. As J3LADE said, you'll need JASS, its best to use JASS.
And why would you need them to die? We need mroe information about your map.
 

WorpeX

New Member
Reaction score
8
Well ok, but now everyone is gonna steal my idea that I stole form someone else. o_O. Anyway, im basing it off a starcraft map that I found awile ago known as Racers. (It wasn't too popular and I dont think the map name did it justice)

The game was a bound like game. You get a zergling and you have to not touch the archons or you die. The point was to get to the end of the map. The trick however, was the the camera would move the whole time, and you had to keep up with it as well as dodge the archons in the process. If you didn't keep up with the camera, you died.

So ya. Im trying to do something like that with WC3 since i loved the map so much. Obviously, it'll be a bit more creative. (the whole not touching archons thing never really caught on with wc3)

So... I dont really know anything about Jass, anyone know how i'd go about making it? Other than having that trigger, the map has been going along pretty smoothly so far. :D

If anyone would like to try the SC game, just IM me (WorpeX) and i'd be glad to play it with you. :)
 

elmstfreddie

The Finglonger
Reaction score
203
Just move the camera, using a defined region like I said, then have an if/then/else, if being a boolean, and using Unit Is In Region. Then check if the unit is in the same defined region (define it again), if so keep him alive. If not, then kill him
 

WorpeX

New Member
Reaction score
8
How do you move the camera using a defined region? I tried doing what you said, but I couldn't get it to work. It creates the region fine, but it doesn't move the region. You'd need to keep creating regions every second or something.
 

TheCrystal

New Member
Reaction score
36
Why would you even need to move a unit? Couldn't you just have him do a play walk sorta thing?
 

WorpeX

New Member
Reaction score
8
huh? How will the camera follow a unit thats just sitting their pretending to walk?

Maybe I dont understand your suggestion, but it sounded kind of dumb to me...
 

TheCrystal

New Member
Reaction score
36
Well, have you ever played The Legend of Lady Dragoon? Its called something else, wc3campaigns, or something, and the Dragoon is sitting ontop of this DoodadUnit that is PRETENDING to move, he isn't, all the ice around him and such is.
What I'm asking is, are you using arrow keys?
 

WorpeX

New Member
Reaction score
8
no, your using the mouse. : / I think if you saw the game Im basing it off you'd understand exactly what im trying to do. Its hard to explain because its pretty much a gametype thats never really been done successfully in wc3.

Do you have starcraft on your computer?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top