Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: How to make a comp unit stop moving?
How to make a comp unit stop moving?
Jun 9 2010, 4:51 pm
By: Jesusfreak  

Jun 9 2010, 4:51 pm Jesusfreak Post #1



Title and Description should say all:

I'm trying to get an NPC for my rpg to turn towards the player (start moving and immediately stop), but the trick to make units stop moving (move them to a location off the map) doesn't seem to work (my only guess is that it's because it's an AI).

Is there another way I can do this?



None.

Jun 9 2010, 5:29 pm samsizzle Post #2



You have to constantly move them to an unwalkable location if they have a tendency to move. If you want them to just stop, I would stop any orders or AI for that unit and then move them to an unwalkable location.



None.

Jun 9 2010, 5:52 pm NudeRaider Post #3

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

To stop an AI you have to remove all units from the player for a certain (unknown) time.
Otherwise I don't see why you can't use an inverted location and always teleport it back when it leaves.




Jun 9 2010, 5:57 pm Jesusfreak Post #4



Well, I was hoping not to waste locations. I tend to go through them rather quickly.

How do I stop a comp's order? I thought moving it to an unwalkable location would immediately cancel it's previous orders?

Also, I notice that whenever I move a comp unit, it wants to go back to the location I moved it from. Besides giving it new orders, is there a way I can prevent this?



None.

Jun 9 2010, 6:03 pm NudeRaider Post #5

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from Jesusfreak
Also, I notice that whenever I move a comp unit, it wants to go back to the location I moved it from. Besides giving it new orders, is there a way I can prevent this?
I wish there was. This made my desert strike map a pain since the units spawn off the playing field.

Quote from Jesusfreak
How do I stop a comp's order? I thought moving it to an unwalkable location would immediately cancel it's previous orders?
Teleporting a unit anywhere (doesn't matter if it's off map onto itself or wherever) cancels one order. This is true for computers and humans alike. So a unit that has been given a queue will skip the current order and perform the next queued order.




Jun 9 2010, 6:09 pm Jesusfreak Post #6



Well, I only gave it one order and the stop trigger... it goes like this:

Issue order to all Overseer (terran goliath) owned by Player 7 at "Dukesville Barracks Interior" move to "Hero P1"
Wait 0 milliseconds
Move all Overseer owned by Player 7 at "Dukesville Barracks Interior" to "Somewhere off the map"
Preserve trigger (this should only happen once per player since one of the conditions is having exactly a particular number of death counters which constantly goes up)



None.

Jun 9 2010, 6:17 pm NudeRaider Post #7

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

This makes no sense. You order the goliath to move and immediately after that you order it to stop. I recommend deleting the first 2 lines.

I think the reason why it moves regardless is that it takes a moment to trace a route to the target, and since the teleport is taking place the next frame already the unit hasn't started moving yet and thus the movement isn't canceled. /theory




Jun 9 2010, 6:21 pm CecilSunkure Post #8



Whenever I create a map like an RPG I use about 3-4 players as neutral players. Neutral players don't have Ai that move dropships or medics, and can be ordered to move//patrol via triggers. I'm not talking about player 12, but players 1-8 set to the neutral status rather than computer.

This way you can do whatever you want easier without worrying about Ai messing with anything.

If you are interested, you can use EUD conditions to read the direction of a specific unit of where it is facing. I don't know if that would be helpful to you at all though.

As for making a unit face a certain direction, you could possibly make it attack a burrowed unit under the player. You could also order move to player --> order move to current location.

Example: You have one LARGE location covering a large portion of the map (this could be anywhere, and is used to center a 1x1 location onto specific units), and a small 1x1 location used to center onto things. Center this location onto the unit you want to order, order it, then center it onto it the unit and order the unit to the 1x1 location.



None.

Jun 9 2010, 6:37 pm Jesusfreak Post #9



4 players as neutrals?!? That's impossible. I'm already using 4 comps as different factions, and less than 4 players would be bad.

Anyways, NudeRaider, I tried your idea... he pauses for a brief second and then keeps moving.



None.

Jun 9 2010, 6:41 pm CecilSunkure Post #10



If you give units to player 12 they keep their original color. You could order it, order it to stop then give it to player 12.



None.

Jun 9 2010, 7:01 pm Jesusfreak Post #11



Hmm, it appears to work if I order it to stop enough times. I suppose this will work.

Woohoo, I got the first path to my first conversation done and I've been officially working on this project for months. I AM on fire :><: .



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[10:11 pm]
Ultraviolet -- :P
[10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
[2024-4-17. : 1:53 am]
Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
[2024-4-17. : 1:52 am]
Vrael -- hah do you think I was born yesterday?
Please log in to shout.


Members Online: Sylph-Of-Space, jun3hong