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.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top