Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: I have problem with moveunit-trigger
I have problem with moveunit-trigger
Feb 28 2012, 4:49 pm
By: y10k  

Feb 28 2012, 4:49 pm y10k Post #1



How do I prevent units moving back to their original position after being teleported (besides giving them to P12 and back)?



None.

Feb 28 2012, 5:31 pm Roy Post #2

An artist's depiction of an Extended Unit Death

After moving them, issue them an order to move to where they were just being teleported. Something like "Order to all [moved unit type] at [teleport location]: Move to [teleport location]."




Feb 28 2012, 8:35 pm Lanthanide Post #3



Please explain the problem better.

When you say "moving back to the original position" do you mean that after you move units from A to B, they will start moving back to A of their own volition? Under what circumstances?

I found a rather strange instance of this in my map. Normally I spawn all the units in a location and then move them onto a battlefield. Then I had a special effect that created lots of enemy spider mines on the battlefield: air units would attack the spider mines and then when the spider mines burrowed the air units would lose their target and they would all start flying back to their original spawn location. Nothing I tried could prevent this "flying back home" behaviour - it appears that when the air units 'lost' their targets they just automatically flew back to their creation spots. The solution was to make the spider mines invincible for a couple of seconds while they were unburrowed, thus preventing the air units (or any other units) from attacking them. Then once they're burrowed, the take invincibility off them and everything is fine.

So please give a more thorough description of the problem; Roy's suggestion made 0 difference in my case, for example.



None.

Feb 28 2012, 8:45 pm TiKels Post #4



Considering he used the word "Move" back to their original location, I'd assume he meant he believes they are teleporting back.

You could be trying to move them to an invalid location (all air blocked off) in which case they would never move over.

Alternatively if they are being ordered back, you could try moving the air units to a location (from the position where they are being ordered from) with all the air blocked, which is commonly done with a small location with lifted terran buildings covering it. This will force the air units to stand still after being moved.



"If a topic that clearly interest noone needs to be closed to underline the "we don't want this here" message, is up to debate."

-NudeRaider

Feb 28 2012, 8:53 pm Lanthanide Post #5



I've never seen units 'teleport' back to a spot after they have been Moved somewhere. I don't know how or why that could even happen, unless they never actually were moved in the first place.



None.

Feb 28 2012, 10:50 pm y10k Post #6



Ok, so I have got a unit standing at X1,Y1 position (I hope you get this).
I use the MoveUnit trigger to teleport it to X2,Y2.
But right after that it starts walking (or flying) back to X1,Y1.
It happens in any circumstances.

Roys advice would work but it causes some other troubles.
Like it orders all units of the same type around it to move there as well.
Its however not a big deal but i rather stick to P12 trick still.

Post has been edited 1 time(s), last time on Feb 28 2012, 10:58 pm by y10k.



None.

Feb 28 2012, 10:53 pm Dem0n Post #7

ᕕ( ᐛ )ᕗ

All units have their own AI that causes them move back to their original location, unless you tell the unit to move to the location they were just sent to (like Roy explained). The only exception is hero units, since they do not have their own AI.




Feb 28 2012, 11:12 pm Lanthanide Post #8



I confirm that Demon is completely wrong: units do not automatically move back to their original location. Just tested this with a map.

It may be best to post the map. My guess is you have some existing order on the units that is making them move back to that location from some other trigger. Remove that order and the problem should go away.

There are effectively 3 ways to remove/cancel orders on units:
1. Give the units a new order, as per Roy's suggestion
2. Give the units between players as that cancels all existing orders, as you've discovered by giving them to P12.
3. In the case of a Move or Attack order, when the unit reaches its destination, the order will expire. Patrol orders remain indefinitely. There also exists the case where the unit is unable to reach it's destination, it may eventually stop trying.

Potentially you could give the players to P12, back to the original player and then move them to the new location. If this is a human player they will lose the selection of any of these units that they had.



None.

Feb 28 2012, 11:57 pm y10k Post #9



Yes, I had already created a brand-new map checking that, it has no more than some randomly placed units, a location and the trigger that moves them. But they still moved back.



None.

Feb 29 2012, 12:05 am Dem0n Post #10

ᕕ( ᐛ )ᕗ

Quote from Lanthanide
I confirm that Demon is completely wrong: units do not automatically move back to their original location. Just tested this with a map.

It may be best to post the map. My guess is you have some existing order on the units that is making them move back to that location from some other trigger. Remove that order and the problem should go away.

There are effectively 3 ways to remove/cancel orders on units:
1. Give the units a new order, as per Roy's suggestion
2. Give the units between players as that cancels all existing orders, as you've discovered by giving them to P12.
3. In the case of a Move or Attack order, when the unit reaches its destination, the order will expire. Patrol orders remain indefinitely. There also exists the case where the unit is unable to reach it's destination, it may eventually stop trying.

Potentially you could give the players to P12, back to the original player and then move them to the new location. If this is a human player they will lose the selection of any of these units that they had.
lies. D; I remember there being some situation that made them go back; Ahli even made a map about it called "Ahli's Magic Show" or w/e.

D: D:




Feb 29 2012, 8:23 pm TiKels Post #11



Quote from TiKels
Alternatively if they are being ordered back, you could try moving the air units to a location (from the position where they are being ordered from) with all the air blocked, which is commonly done with a small location with lifted terran buildings covering it. This will force the air units to stand still after being moved.




"If a topic that clearly interest noone needs to be closed to underline the "we don't want this here" message, is up to debate."

-NudeRaider

Feb 29 2012, 11:55 pm Lanthanide Post #12



Quote from y10k
Yes, I had already created a brand-new map checking that, it has no more than some randomly placed units, a location and the trigger that moves them. But they still moved back.
Post your map, because in my one (regular zerglings) they don't move anywhere.

Quote from name:Dem0nS1ayer
lies. D; I remember there being some situation that made them go back; Ahli even made a map about it called "Ahli's Magic Show" or w/e.
So it's possible they might do it under certain conditions, and those conditions are not met in my map. In which case saying that it always happens is wrong/mis-leading. I suspect it might happen if you're running an AI for the computer or something.

Certainly they do not move back in my DS map either; although normally in that I order the units straight away, if I turn that off they don't attempt to run back to where they were.

I've attached my test map. It is also testing killing/creating units with map max, but that should be ignorable. To make the move trigger activate, move 4 zerglings into the mud area on the map. This will cause a group of zerglings to be moved to the right to another location, where they will not attempt to move back to their original positions.

Attachments:
mapmax.scm
Hits: 2 Size: 62.55kb



None.

Mar 1 2012, 3:20 pm y10k Post #13



In my map these units are owned by the computer, not a human player if that counts.



None.

Mar 2 2012, 3:15 am Lanthanide Post #14



Quickly changing my mapmax.scm map so the lings are owned by P2, again does not exhibit the "move back to original position" problem as you describe it.

Post your test map and/or original map.



None.

Mar 2 2012, 5:38 pm y10k Post #15



Ok, so here it is:

Attachments:
zzztest.scm
Hits: 1 Size: 24.82kb
LastReplay.rep
Hits: 0 Size: 8.72kb



None.

Mar 2 2012, 8:09 pm Lanthanide Post #16



Ok, this is very very bizarre. I see that in your map, the CPU lings will move back. I modded my mapmax version to be CPU after I uploaded it here, and still they did not move back to their original locations. But, after I deleted a whole bunch of lings, and then undid the action and saved it, the map started acting differently.

I now have 2 versions of the map: one where the lings will return to their original location, and one where they do not. There are no trigger differences between them, the only functional difference is the unit index order as it appears on the map.

One other notable thing is that if you approach the CPU lings with your lings, if they don't attack back, they will also not run back to the start after they are moved. If they do attack back, then they will.


Anyway, this definitely confirms that the phenomenon exists.

I've done a little testing, and found why I never see it in my DS map despite using Move extensively. If I give all of the zerglings from P2 to P3 before moving them, then when they are moved they will stay in their destination and not move back. They will also not respond to my zerglings that attack them. If I give the zerglings from P2 to P3 and move them, or give from P2 to P3 move them and give them back to P2 they all simply sit there. Similarly if I go from P2 to neutral to P2 again.

So it seems like a simple Give between players, at any point in the zerglings life, is sufficient to prevent them from running back to their original locations after move.

Attachments:
mapmax.scm
Hits: 0 Size: 62.47kb
mapmax1.scm
Hits: 0 Size: 62.46kb

Post has been edited 1 time(s), last time on Mar 2 2012, 8:16 pm by Lanthanide.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[04:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
[11:17 am]
Zycorax -- :wob:
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[2024-4-27. : 7:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[2024-4-27. : 6:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[2024-4-27. : 3:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1:53 am]
Ultraviolet -- :lol:
[2024-4-26. : 6:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
Please log in to shout.


Members Online: Roy, Oh_Man