Staredit Network

Staredit Network -> UMS Assistance -> Help with Center Locations on multi-units
Report, edit, etc...Posted by smasher25 on 2006-08-28 at 23:58:28
In my map I need to center locations on two of the same units so that the locations follow both of the same units around. Does anyone know how to pull this off? Having two locations following two of the same units around?

Specifically there are two tanks. I have a location that I want to center on one of the tanks the whole time, and there is a location I want to center on the other tank. How to do this, I need help to know.
Report, edit, etc...Posted by MoonlighTurtle on 2006-08-29 at 00:24:36
Well, the main issue is how you will first place the separate locations on the different tanks. Once that is done, you can simply have triggers that constantly center location X on the tank at location X.

Now if the tanks are preplaced then you can preplace locations over them.

If the tanks are in different locations at first, then you can center the locations based on the tanks' different locations.

The most foolproof and reliable way that doesn't require any preplacing or whatever, is to first have the tanks owned by different players. This can be done by giving them, creating them for different players, etc. Then you center the locations on the tanks based on the player that owns the tank. For example location X can center on the tank owned by p1, and location Y can center on the tank owned by p2. Then after both locations are centered on their respective tanks, you can give the tanks to the same player.

Also, the locations will have to remain small, no bigger than 1x1, so that if the two tanks get close to eachother, the locations will still center on the ones they are supposed to. Basically, when the location is centered on a tank, you want it small enough so that another tank cannot be in that location.

Once the locations are placed over their respective tanks, you can keep them there by simply having an always preserved trigger with the action:
center location X on tank owned by whatever player at location x.

That will basically center the location on the tank at that same location. With hyper triggers, the location should be constantly centering fast enough to keep up with the tank.
Report, edit, etc...Posted by smasher25 on 2006-08-29 at 00:53:49
ok here's a second problem, this is sorta like "Entering a vehicle thing" when you bring guy to Tank, and he gets control of the tank. Then the guy is moved to a place where he remains still but ther's a beacon that can make him get out. If you move him out I want him to move out of the place that the tank was.
Report, edit, etc...Posted by JordanN_3335 on 2006-08-29 at 09:53:13
QUOTE(smasher25 @ Aug 29 2006, 12:53 AM)
ok here's a second problem, this is sorta like "Entering a vehicle thing" when you bring guy to Tank, and he gets control of the tank. Then the guy is moved to a place where he remains still but ther's a beacon that can make him get out. If you move him out I want him to move out of the place that the tank was.
[right][snapback]552874[/snapback][/right]


Hmm center a location on the tank but make 2 different kinds. Is the tank neutral at first or owned by a comp? so now do this.

==========
Conditions
==========
Current player brings exactly 1 civ to enter tank
"Tank owner" brings exactly 1 tank to enter tank
==========
Actions
==========
Wait 3000 miliseconds= 3seconds just to make sure the trigger doesnt multiply
Give Tank to player who owns civ at location enter tank
Move civ from enter tank to tank controll area
Preserve trigger
==========

Now getting the player back out of the tank
Make sure the centering trigger on the tank is used before the top trigger
===========
Conditions
===========
Current player brings exactly 1 civ to "leave tank area"
Current player commands exactly 1 tank
===========
Actions
===========
Wait 2000 mili seconds
Mive unit from leave tank area 1 to leave tank area 2
Give tank owned by current player to "Tank owner"
Preserve trigger
===========

Also make a second trigger were centering is on the tank but it needs to be a larger location like 5x5 size.
Report, edit, etc...Posted by PCFredZ on 2006-08-29 at 11:02:28
If there's only one guy, just center the location on him instead of the tanks.

Otherwise your situation will be a bit harder to solve for the following reasons:
1) to center a single location on many units, you need to give the units away every time you move on to the next unit in the list; however, this will render the units uncontrollable for a human player
2) to center separate locations on separate units, you will need to ensure that a) the units don't ever cross paths (or they will "steal" the locations from each other) or b) the units are followed by locations smaller than their unit size (usually less than 1x1), so that even when the units touch each other, their locations only stay on a single unit
3) in the case of 2b), you cannot allow people to enter the tanks because when the people are next to the tanks, they will not be detected by the location following the tanks

Therefore what you have to do is go with 2b) but add a new location that centers on tanks in their own "following" locations, making this location bigger than the size of the tank.

Your map will end up looking like this:

QUOTE
Location setup: locationA and locationB are both 16x16 pixels big; locationA is placed on TankA and locationB is placed on TankB; locationC is 32x32 pixels (standard) or bigger if you need; locationD is the place where the people are transferred after entering TankA; locationE is a beacon signifying the exit to TankA; locations F and G are the same as D and E except for TankB

Cond: Player brings at least 1 Tank to locationA
Act: Move location "locationA" on Tank owned by Player at "locationA"
Act: Preserve

Cond: Player brings at least 1 Tank to locationA
Act: Move location "locationC" on Tank owned by Player at "locationA"
Act: Preserve

Cond: Player brings at least 1 Civilian to locationC
Act: Move all Civilian for Player at locationC to locationD
Act: Any other actions you need
Act: Preserve

Cond: Player brings at least 1 Civilian to locationE
Act: Move all Civilian for Player at locationE to locationC
Act: Any other actions you need
Act: Preserve

Copy all triggers above for locationB, replacing the other locations as needed (except locationC, which is used for both)
Report, edit, etc...Posted by Lord-Omega on 2006-08-29 at 11:06:40
ok here do this, delete one tank, and replace it with a edmund duke tank, rename the edmund duke to a reg tank name or whatever than have the locs goto them but have it so one goes to the hero, oh and make it so its attack and health and what not is all the same, it should work fine, unless you were gonna use the hero tank for somthing else....
Report, edit, etc...Posted by smasher25 on 2006-08-30 at 19:31:57
Ok everything is confuising me. To omega I do plan to use the Hero tank.

I'll add some more specifications:

There are two different players who get to go into the tank, player red and player blue. They both have different units, and I have two tanks of the same kind. I think I might be able to peace together the (Going in) thing, but now I have to solve the going out.

When the guy drops out, I want him to land beside where he piloted the tank.
Report, edit, etc...Posted by Lethal_Illusion on 2006-08-30 at 19:56:17
I don't know if this has been mentioned, but you can just use two small locations (shown in this map:).
[attachmentid=20909]

You can also center larger locations on the smaller locations if you want.
Report, edit, etc...Posted by Killer_Kow(MM) on 2006-09-01 at 15:02:20
Have a location centered on the player's unit, then when he comes in contact with the tank, he goes to the cockpit (or whatever), the tank becomes his and then the player's location centers on the tank, instead of the player. When he gets out, it resumes to normal.
Next Page (1)