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.
[02:53 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: I'll check it out this weekend!
Thanks
[02:47 am]
Symmetry -- I'll check it out this weekend!
[02:40 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: Another map maker? Damn we really ARE back
I invite you to try out the map I modified. I don't have the creativity to create maps from scratch, but I do have the know-how to modify existing ones; my project is to tweak community campaigns (specifically those with errors—to make them playable.
[02:27 am]
Symmetry -- Another map maker? Damn we really ARE back
[01:51 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Now that I wanted to change my avatar, the error image is showing up, haha.
[01:34 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Mr.BurnLiquid
Mr.BurnLiquid shouted: Ultraviolet Thanks; I'm new to the site and a Spanish speaker. I must have missed the part where it was prohibited—I'll change it now.
I invite you to try out a mission I'm modifying from *StarCraft Reversed*; I'm trying to make it more playable and challenging.
[01:33 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Thanks; I'm new to the site and a Spanish speaker. I must have missed the part where it was prohibited—I'll change it now.
[01:31 am]
Ultraviolet -- Mr.BurnLiquid
Mr.BurnLiquid shouted: Ultraviolet Is it forbidden to have a large avatar?
actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
[12:20 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: https://staredit.net/profile/133367/ dude's avatar is massive
Is it forbidden to have a large avatar?
[12:04 am]
Ultraviolet -- https://staredit.net/profile/133367/ dude's avatar is massive
Please log in to shout.


Members Online: UndeadStar, Ultraviolet