Staredit Network

Staredit Network -> Concepts -> Morph fixed.
Report, edit, etc...Posted by JaFF on 2006-07-24 at 05:29:48
Some time ago, I was making a Thing map. Now it's frozen for some time. I had a problem with "Morphing" (shifting forms from Zergling to Marine and from a Marine to Zergling).

The problem: The Zergling is a bit smaller than a Marine, so he can approach walls a bit closer. If you approach a wall with a Zergling, and then Morph, your Marine will have not enough space, and will be moved to the middle of the map.

What i did before:
-center location
-move unit in that location away
-move new unit into that location

What was suggested: there were suggestions like "first move the marine to the location of the zergling, and then remove the zergling from the battle arena". That was unacceptable for me, because it would Morph not in the same spot.

How did it get fixed:
Locations:
"Prepare to morph" - where your form is at when it is not used, in other words: if you are using the Marine now, the Zergling is located at "Prapare to morph"
"Battle Arena" - the arena where the main action takes place. It's the whole map excluding the "Prepare to morph" locations (for each player his own "Prepare to morph", but I will explain as if there was only one player)
"Morph" - a 1x1 location needed to Morph.

Trigger...
Players: current player
Conditions: Morph condition
Actions:
-center location "Morph" at any men owned by current player at "Battle arena"
-give all men controlled by current player at "battle arena" to Player 7 (just a comp)
-move all men for current player at "Prepare to morph" to "Morph"
-move all men owned by Player 7 at "Battle arena" to "Prepare to morph"
-give all men owned by Player 7 at "Prepare to morph" to current player
-move all men owned by current player at "Battle Arena" to "Morph"
-Preserve

For some strange reason the marine doesen't end up in the middle now, it ends up in the closest possible coordinate to locations "Morph" center. Maybe it's because the marine could "see" that place... or just because it was close enough to him ?

And ideas why is this happening ?
Report, edit, etc...Posted by Kenoli on 2006-07-24 at 07:11:32
The only reason for the unit to end up in the middle would be if you moved the location to a unit that didn't exist.
For example, if you had moved "Morph" to a Marine at "Anywhere", but there wasn't actually a Marine on the map, the location would go to the center of "Anywhere" which also happens to be the center of the map.

QUOTE(Jammed)
What was suggested: there were suggestions like "first move the marine to the location of the zergling, and then remove the zergling from the battle arena". That was unacceptable for me, because it would Morph not in the same spot.
That's exactly what the triggers you posted do, except with the added action "move all men owned by current player at "Battle Arena" to "Morph"" which makes sure the Marine is moved to the same spot the Zergling was in.

There's a topic about a similar problem in the Assistance forum.
They were basically trying to replace a Marine with a powerup.
You can read the solution I posted if you want.
Report, edit, etc...Posted by JaFF on 2006-07-24 at 07:36:56
QUOTE(Kenoli @ Jul 24 2006, 02:11 PM)
The only reason for the unit to end up in the middle would be if you moved the location to a unit that didn't exist.
[right][snapback]530211[/snapback][/right]

I'm sure it existed tongue.gif I tryed moving computer controlled and player controlled units to locations where they cannot fit. The results are the following:

-PC controlled units stay where they were
-Player controlled units end up in the middle of the map.
Report, edit, etc...Posted by LegacyWeapon on 2006-07-24 at 08:42:23
Show us the map.
Report, edit, etc...Posted by JaFF on 2006-07-24 at 10:08:29
Interesting... I made a map to show it, and the Player controlled unit didn't move this time, just like the computer controlled. But while I was working on my Thing map a fwile ago, the player controlled unit always ended up in the middle if you morphed near a wall... The onlt difference now is that you have no observer hallunication dying in your location.

It's not so obvious with moving the PC marine, but look at the triggers.
Next Page (1)