How can i make a unit that triggers can attack move but i as user cant (my unit).
I want to be able to use the unit abilities as well like stimpack, storms, emp and so on but i should to be able to move the unit while triggers can move it.
How to do that ?
Badly need help with this :)
Is it maybe possible to add some trigger then simple just remove any move order i give to the unit or something like that? but how can triggers in that case separate if its a user input order to move or trigger based order?
In my map all units are ordered to attack move toward and set angle every 1 sec.
The image i uploaded is so close to a solution it hurts.
The trigger don't work because it loops it self, its like saying "if trigger runs then run it again".
I need to know if there is a way to do a condition that checks if input is made from trigger or user.
You can try to set a boolean variable, whenever an order is given via trigger, then check for this boolean in the reaction trigger. If boolean was set, its a trigger command, don't interfere, just reset the boolean. If boolean was not set, it was a user command, cancel that.
You can also make the unit uncommandable and use dialog buttons to cast these abilities, or use a dummy unit, which always moves with the unselectable moving unit but has no move ability itself, only the psi storm etc.
You can try to set a boolean variable, whenever an order is given via trigger, then check for this boolean in the reaction trigger. If boolean was set, its a trigger command, don't interfere, just reset the boolean. If boolean was not set, it was a user command, cancel that.
This sounds good but i dont know how to do that, can you upload a screenshot or just write how that line would look?
I tested to enable a boolen just before the command and then disable right after it but the other trigger is not fast enough to react to that.
On a popular map on the EU server there is a map called desert strike 1338, on that map they have the exact same function i want. The thing that happens on there map when you try to move the unit is:
1. It does the sound as when it revive an order like "ai ai captain"
2. The move mark on the point you click appear just like normal.
3. the unit just ignore your command and keeps going.
If i try to que up move commands then it does so, and it keep the que order intact, it does not overwite them.
The movement que order is however overwritten if i just try to move the unit. So if i try to move the unit then it reissue and overwrite the move order i just gave.
To me it sounds like they do a check whatever the order given is from a user or a trigger. It can also just be a compare order check cause all units that spawn on that map is given the order to all attack the same point and that order is not reissued until i try and move the unit.
This does not work :/
I tested to enable a boolen just before the command and then disable right after it but the other trigger is not fast enough to react to that.
Try to not disable the boolean in the same trigger, disable it in the 2nd trigger
Quote:
On a popular map on the EU server there is a map called desert strike 1338, on that map they have the exact same function i want. The thing that happens on there map when you try to move the unit is:
1. It does the sound as when it revive an order like "ai ai captain"
2. The move mark on the point you click appear just like normal.
3. the unit just ignore your command and keeps going.
If i try to que up move commands then it does so, and it keep the que order intact, it does not overwite them.
The movement que order is however overwritten if i just try to move the unit. So if i try to move the unit then it reissue and overwrite the move order i just gave.
To me it sounds like they do a check whatever the order given is from a user or a trigger. It can also just be a compare order check cause all units that spawn on that map is given the order to all attack the same point and that order is not reissued until i try and move the unit.
Maybe this give you some idea on how they do it?
There might be a better solution, yes. Never played Desert Strike, though, you could contact the developers.
€ Desert Strike seems to catch the specific Move command and replaces them with the attack move to target point command. Also, it re-issues that command, if a unit becomes idle, and all command-card buttons for stuff like Patrol or Hold Position are disabled/deleted, so the only thing to worry about are the move commands issued via right-click. No specific detecting of player commands vs trigger commands, trigger commands just never issue a move order in the map.
I did copy there exact same way of doing things and i got it to work. all units receive the exact same order from the trigger, Now i just have to check if the order input is on the exact same point as the trigger does it. Its not as i wanted it but its ok for now.
How can i make a unit that triggers can attack move but i as user cant (my unit).
I want to be able to use the unit abilities as well like stimpack, storms, emp and so on but i should to be able to move the unit while triggers can move it.
How to do that ?
Badly need help with this :)
Is it maybe possible to add some trigger then simple just remove any move order i give to the unit or something like that? but how can triggers in that case separate if its a user input order to move or trigger based order?
In my map all units are ordered to attack move toward and set angle every 1 sec.
The image i uploaded is so close to a solution it hurts.
The trigger don't work because it loops it self, its like saying "if trigger runs then run it again".
I need to know if there is a way to do a condition that checks if input is made from trigger or user.
You can try to set a boolean variable, whenever an order is given via trigger, then check for this boolean in the reaction trigger. If boolean was set, its a trigger command, don't interfere, just reset the boolean. If boolean was not set, it was a user command, cancel that.
You can also make the unit uncommandable and use dialog buttons to cast these abilities, or use a dummy unit, which always moves with the unselectable moving unit but has no move ability itself, only the psi storm etc.
This sounds good but i dont know how to do that, can you upload a screenshot or just write how that line would look?
This does not work :/
I tested to enable a boolen just before the command and then disable right after it but the other trigger is not fast enough to react to that.
On a popular map on the EU server there is a map called desert strike 1338, on that map they have the exact same function i want. The thing that happens on there map when you try to move the unit is:
1. It does the sound as when it revive an order like "ai ai captain"
2. The move mark on the point you click appear just like normal.
3. the unit just ignore your command and keeps going.
If i try to que up move commands then it does so, and it keep the que order intact, it does not overwite them.
The movement que order is however overwritten if i just try to move the unit. So if i try to move the unit then it reissue and overwrite the move order i just gave.
To me it sounds like they do a check whatever the order given is from a user or a trigger. It can also just be a compare order check cause all units that spawn on that map is given the order to all attack the same point and that order is not reissued until i try and move the unit.
Maybe this give you some idea on how they do it?
@Sherlia: Go
Under Unit - Order and above Variable - Set (False) you can put in a wait action (like 0.1 sec or smaller)
Try to not disable the boolean in the same trigger, disable it in the 2nd trigger
There might be a better solution, yes. Never played Desert Strike, though, you could contact the developers.
€ Desert Strike seems to catch the specific Move command and replaces them with the attack move to target point command. Also, it re-issues that command, if a unit becomes idle, and all command-card buttons for stuff like Patrol or Hold Position are disabled/deleted, so the only thing to worry about are the move commands issued via right-click. No specific detecting of player commands vs trigger commands, trigger commands just never issue a move order in the map.
I did copy there exact same way of doing things and i got it to work. all units receive the exact same order from the trigger, Now i just have to check if the order input is on the exact same point as the trigger does it. Its not as i wanted it but its ok for now.
So just removing the button for the attack ability in the command card is not an option? Otherwise I am stumped.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg