| 12-07-2003, 03:48 PM | #1 |
I'm trying to make a unit guy who will walk around and do stuff but at the same time be able to sell items to people. Theres one problem tho- the person whos being sold to can control him. I don't want that to happen, how can I stop this from happening? |
| 12-07-2003, 10:22 PM | #2 |
Trigger: Code:
Event: Unit is issued order Condition: Unit is of type (your merchant here) player (triggering player) not equal to owner of unit (triggering unit/ordered unit) Action: Order unit (triggering unit/ordered unit) to stop That might work... But if you have the unit wandering around via triggers it might not work... I don't know, didn't test it. |
| 12-08-2003, 08:04 AM | #3 |
That will prevent him from being moved around but it may also prevent him from selling. You will have to test it but it will prob work for you. |
| 12-08-2003, 08:13 AM | #4 |
Actually, it won't pevent selling, because selling doesn't have a "Stop" and doesn't recognise "Stop" and also the sell starts and finishes so fast that the trigger couldn't stop it anyway. ;) |
| 12-08-2003, 12:49 PM | #5 |
It's true. But this trigger will allow the unit to move a short distance before he stops, no? If it's important to you to not have him move at all, you should do this: E - unit is issued an order targeting a point E - unit is issued an order targeting an object E - unit is issued an order with no target C - unit-type of (ordered unit) = YourUnitType C - (triggering player) not equal to owner of (ordered unit) C - OR: Any conditions are true: ------ string(issued order) = smart ------ string(issued order) = move ------ string(issued order) = patrol ------ ETC. (make sure "stop" is not included though) A - Pause (ordered unit) A - Wait 0 seconds A - Order (ordered unit) to stop A - Wait 0 seconds A - Unpause (ordered unit) |
| 12-08-2003, 01:37 PM | #6 |
Perhaps you could reduce his movement speed to 0 while a player has control of the unit. I havent tested it but its possible the select hero ability will create an event. You could use that to make the merchant stop. Of course the other workaround is to constantly move a shop together with the merchant (flying unit so it obscures the actual unit) |
| 12-08-2003, 02:42 PM | #7 |
when he is near a person to sell items, ude want him to stop right? well when a player controled unit goas near him make him stop, face unit, set movement to 0. |
