Report, edit, etc...Posted by OhManTfe on 2006-11-02 at 07:16:13
Hey everyone I was just wondering how do I make a unit under player control stand still even if the player tries to move it by right clicking? And I want this as a on/off option so I can turn it on during cutscenes and turn it off during everything else.
Thanks, Oh_Man[TFE]
Report, edit, etc...Posted by DooM77 on 2006-11-02 at 08:08:58
There are two ways of doing it: 1. I guess you saw effect of this - you can use "Pause game" as action of trigger then perform your cutscene and finally "Unpause game" when cutscene is finished. 2. You can also prevent units from moving from its place by looping teleport(move) units to location (alternatively issue order to move but its not such effective) where thay are staying.
for example:
1.Conditions: -begin of cutscene conditions Actions: -set switch "hold_units" -move location "Stay here" to Zealot owned by layer X at anywhere
2.Conditions: -"Hold units is set" Actions: -move all Zealots owned by player X at anywhere to "Stay here" -preserve trigger
3.Conditions: -end of cutscene conditions (f.e. deaths of timer is exacly 0) Actions: clear switch "hold_units"
I suggest first way while making 'global' cutscene, else, if you don't want to freeze all units on a map use second way but it'll cost you more effort.
Report, edit, etc...Posted by CheatEnabled on 2006-11-02 at 08:46:54
Or just give it to another player and give it back when you don't need it. ( You won't be able to attack with the unit either though.)
Report, edit, etc...Posted by fritfrat(U) on 2006-11-02 at 15:39:37
Cheat's way sort of works in that you can't select the unit to order him to move. Pause game only works in single player. Ordering them or moving them to the same location over and over again works well, too.
I'd personally use something not mentioned here (but for some reason present in about 2-3 other topics right now), which would be to use Move Unit with preserve trigger to a location that the units can't walk on. Though frozen, they will still be able to attack, so you may want to utilize Set Alliance Status as well.
Report, edit, etc...Posted by Falkoner on 2006-11-02 at 19:22:50
Also, they can use spells when teleporting them but remember to use hypers, which no one stated. Also, I don't know why you started this topic, since my topic, about 3 or 4 topics down is asking excactly the same sorta thing.
Report, edit, etc...Posted by OhManTfe on 2006-11-05 at 23:57:51
QUOTE(fritfrat(U) @ Nov 3 2006, 06:39 AM)
Cheat's way sort of works in that you can't select the unit to order him to move. Pause game only works in single player. Ordering them or moving them to the same location over and over again works well, too.
I'd personally use something not mentioned here (but for some reason present in about 2-3 other topics right now), which would be to use Move Unit with preserve trigger to a location that the units can't walk on. Though frozen, they will still be able to attack, so you may want to utilize Set Alliance Status as well. [right][snapback]582228[/snapback][/right]
Ok well I made the units move to water and preserved trigger but they still try to walk there?
QUOTE(DooM77 @ Nov 2 2006, 11:08 PM)
There are two ways of doing it: 1. I guess you saw effect of this - you can use "Pause game" as action of trigger then perform your cutscene and finally "Unpause game" when cutscene is finished. 2. You can also prevent units from moving from its place by looping teleport(move) units to location (alternatively issue order to move but its not such effective) where thay are staying.
for example:
1.Conditions: -begin of cutscene conditions Actions: -set switch "hold_units" -move location "Stay here" to Zealot owned by layer X at anywhere
2.Conditions: -"Hold units is set" Actions: -move all Zealots owned by player X at anywhere to "Stay here" -preserve trigger
3.Conditions: -end of cutscene conditions (f.e. deaths of timer is exacly 0) Actions: clear switch "hold_units"
I suggest first way while making 'global' cutscene, else, if you don't want to freeze all units on a map use second way but it'll cost you more effort. [right][snapback]582146[/snapback][/right]
This doesn't work possibly because I use a move location as the location it has to work too?
Report, edit, etc...Posted by Kenoli on 2006-11-06 at 02:14:28
QUOTE(OhManTfe)
Ok well I made the units move to water and preserved trigger but they still try to walk there?
Use "Move Unit", not "Order". Trying to use Move Unit to teleport a unit to unwalkable terrain (such as water) will result in the unit not going anywhere at all. A side effect of doing this is that it interrupts the unit's orders. That is, if the unit was walking somewhere, it will suddenly stop in place. If you do it fast enough, it will render the unit completely immobile.
Report, edit, etc...Posted by Mp)Blu on 2006-11-06 at 11:10:48
QUOTE(Kenoli @ Nov 6 2006, 01:14 AM)
Use "Move Unit", not "Order". Trying to use Move Unit to teleport a unit to unwalkable terrain (such as water) will result in the unit not going anywhere at all. A side effect of doing this is that it interrupts the unit's orders. That is, if the unit was walking somewhere, it will suddenly stop in place. If you do it fast enough, it will render the unit completely immobile. [right][snapback]584330[/snapback][/right]
Do you know exactly how fast this is? I might need this also. I could test this on my own, but I'm at school so hopefuly this will be answered by the time I get home
Report, edit, etc...Posted by Ichi on 2006-11-06 at 11:29:04
QUOTE(Mp)Blu @ Nov 6 2006, 11:10 AM)
Do you know exactly how fast this is? I might need this also. I could test this on my own, but I'm at school so hopefuly this will be answered by the time I get home [right][snapback]584410[/snapback][/right]
Its hard but you can move, its not perfect
Report, edit, etc...Posted by Mp)Blu on 2006-11-06 at 11:38:33
Ok then I guess I will have to test this after all. thx anyways
Report, edit, etc...Posted by Kenoli on 2006-11-06 at 14:29:39
QUOTE(Mp)Blu)
Do you know exactly how fast this is?
With hyper triggers, you can do it 12 times per second. This is fast enough to keep any ground unit from moving. (For some air units it is possible to move a little if the player rapidly clicks)
Report, edit, etc...Posted by Tuxedo Templar on 2006-11-06 at 15:09:40
What I do (recently) is give unit to P12 and back in the same trigger with hypers. Players can't select and order them fast enough to do anything, normally. Even if they could, it'd be a simple matter to add a move unit order or something to counter it as backup.
Report, edit, etc...Posted by OhManTfe on 2006-11-07 at 22:55:00
Ok thanks guys I'm using Kenolis idea though because I want to keep vision with the unit. And yes I have hyper triggers, they have to be given to a computer unit that has no other waits correct?
Report, edit, etc...Posted by spinesheath on 2006-11-08 at 00:18:35
Just check out the tut on Hypers, there is a little more to it. But if you use them the way you suggested, you should be fine.
Report, edit, etc...Posted by OhManTfe on 2006-11-08 at 06:48:16