Staredit Network > Forums > SC2 Assistance > Topic: Region move on Unit
Region move on Unit
Aug 9 2010, 6:30 am
By: Vincent  

Aug 9 2010, 6:30 am Vincent Post #1



I need help figuring out how to move a region on a unit successfully so I can have the region used like this.

If picked unit enters region area 'player 1 center' then kill unit at region 'player 1 center'.



None.

Aug 9 2010, 7:47 am shmeeps Post #2



There's an action called "Move Region", do that, for the point value, do "Position of Unit" under functions. It'll look like this:

Code
Region - Move Region to (Position of (Triggering unit))


The events and conditions are yours. If you give some more info we could help with those too.



None.

Aug 9 2010, 8:20 am Vincent Post #3



Quote from shmeeps
There's an action called "Move Region", do that, for the point value, do "Position of Unit" under functions. It'll look like this:

Code
Region - Move Region to (Position of (Triggering unit))


The events and conditions are yours. If you give some more info we could help with those too.

Yes that's what I need help with, how do I have it so when a unit spawns the region gets located on the unit asap.

Also I need help with coding a way for a 'Carrier' when brought to an 'Observer' (There are over 300 Observers on the map so I can't do single unit stuff) to have the 'Carrier' killed.



None.

Aug 9 2010, 12:22 pm Devourer Post #4

Hello

Depends on whether the unit was created via trigger or build by a building or something:
for trigger, do this in the same trigger "create unit..." -> "move region to ( position of unit ( last created unit ) )"
else... is there something like unit is trained?
If not, "any unit enters region (entire map)". Use this with some conditions.


Carrier, make any unit enters range of unit
The second unit to "Carrier", I suggest creating a "Unit-Variable" which value is the carrier itself. Condition, unit type of triggering unit (which is the first unit paramter (the "any")) is obs.



Please report errors in the Staredit.Network forum.

Aug 9 2010, 6:23 pm shmeeps Post #5



I don't have a copy of the editor with me on this computer, but I believe that there is an event called "Unit is created", or something similar, which can specify either created by being built, or created by a trigger. For the unit type, you would specify the function "Unit of type", and the type would be carrier. Then of course, the action would be "Move region to (Position of Unit(Triggering Unit))".

I agree with the second part, the easiest way would be in the "Unit is created trigger", set a global Unit variable to the carrier (Use an array if you have one for each player), then make a trigger "Unit of type(Observer) Enters Region", with actions, "Kill Unit(Carrier)", where Carrier is the unit variable. It would also be possible to do a Kill all units of type(Carrier), but you make experience some bugs with this (For instance, you may have two carriers, one in say, the middle, one on the left that is barely in the region of the carrier in the middle, and then an observer on the right, barely in the region of the middle carrier. The trigger would kill both carriers, as there are two in the region, technically, although the observer is no where near the carrier on the left).

I believe the easiest way between efficiency and coding difficulty would be to create a Unit array to store all of the carriers, make multiple regions (one for each carrier), and make sure you only kill the carrier that belongs to the region that the observer has entered.

Sorry if this is a bit vague, please let me know if you need some clarification.



None.

Aug 9 2010, 7:23 pm Devourer Post #6

Hello

Sheemps, you are thinking "in a SC1" way, you do not need regions at all. Same for pr0-, if you are going to make a dodge map you actually need zero or maybe 1-2 regions.

Is it right that you only want to have a dodge map? Like, every player got a carrier (or 1 player got two, doesn't matter at all) and they should die once an observer touches them? If so, you need absolutely no location for the case that the observers should roam around in the entire map.



Please report errors in the Staredit.Network forum.

Aug 9 2010, 9:04 pm shmeeps Post #7



Quote from Devourer
Sheemps, you are thinking "in a SC1" way, you do not need regions at all. Same for pr0-, if you are going to make a dodge map you actually need zero or maybe 1-2 regions.

Is it right that you only want to have a dodge map? Like, every player got a carrier (or 1 player got two, doesn't matter at all) and they should die once an observer touches them? If so, you need absolutely no location for the case that the observers should roam around in the entire map.
You could do this with the event "Unit Enters/Leaves Range of Unit", but this event may not fire as quickly as "Unit Enters/Leaves Region". It really depends on if the region trigger is based upon point math (arithmetic) or boundary range (comparison).

Either way, it might be more efficient then running a trigger every 0 seconds to update the location of the region onto the location of the unit. Your choice there.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2026-4-18. : 3:57 am]
NudeRaider -- https://staredit.net/381600/ You have 5 minutes, then you can only edit your posts.
[2026-4-17. : 4:05 pm]
NudeRaider -- DarkenedFantasies
DarkenedFantasies shouted: you eat lots of beans
:lol:
[2026-4-17. : 11:30 am]
NudeRaider -- I would like 3000 minerals, please
[2026-4-16. : 7:32 pm]
Zoan -- I got $2000 bonus. I would like 2000 minerals, please
[2026-4-16. : 4:15 am]
DarkenedFantasies -- you eat lots of beans
[2026-4-16. : 3:46 am]
IskatuMesk -- how do i get gas
[2026-4-15. : 11:43 pm]
Moose -- you don't
[2026-4-15. : 10:06 pm]
Zoan -- how do i get minerals
[2026-4-14. : 11:45 pm]
ClansAreForGays -- Anyone wanna played Skewed StarCraft?
[2026-4-14. : 12:07 am]
Vrael -- NudeRaider
NudeRaider shouted: Vrael ranting still is though
you're a gentleman and a scholar, thank you
Please log in to shout.


Members Online: DarkenedFantasies