I have zealots with guns and blades. They can choose between their weapon systems and specific weapons must be researched.
It's fairly straightforward, when you tell the unit to activate the selected weapon, it is an effect instant with a SET effect which orders the unit to morph into the Zealot with gun actor, and then the second effect applies a buff which gives them the appropriate weapon. To deactivate the gun and return to blades, the command is a direct morph back to zealot with blades. All is fine as long as the zealots are not colliding with each other.
I couldn't figure out why but they are always glitching in the game until now. When the zealots are in large groups and the orders are given in MASS to move or the zealots are standing to close Some will not morph properly. I have tried using the disable collision flags to no avail. I also added a buff to morphing units which disables colission and allows them to travel through other units. This does not work either. Another wierd thing that happens. When some of the zealots glitch and dont activate their weapons or morph properly (Or if you have a set of zealots with guns and a set of zealots with blades and you select them all to hit the deactivate (morph back to blades) command. It also orders the zealots without guns to morph to guns. I can't figure out for the life of me why it is ordering the zealots with blades to go to guns. There is no issue order on that ability since its just the morph ability.
Long story short, it is extremely glitchy when you try to group up multiple units and have them morphing from guns to blades and back and forth, and it is all caused by collision with nearby other zealots.
I don't know why simply disabling collission didn't solve the problem. Again I've added separate buffs to disable collision and it still doesn't' fix the problem and none of the flag settings seem to solve it either. If you want I can post a video for you of the issue. I also need to make it so when you have Zealots with guns, and Zealots with blades selected in a mass group and you want to order the zealots with guns to morph to zealots with blades it doesn't also morph the zealots with blades to guns.
Nice! That solves the initial problem, but still leaves the other issue.
The other issue is pretty serious as well since if you have multiple zealots with different weapons selected, some guns, some blades and you select all of them the ability to morph back to blades orders the ones with guns to go to blades but then orders the ones already on blades back to guns! Can't figure out why its doing that.
It's almost as if when you order the gun units to go to blades, all the blade units get the opposite order to go to guns but I just don't see how that is possible since the going to blade order has no effect tree and how could it trigger a totally different ability to activate?
SOLVED
I have solved this by placing a requirement on the morph ability checking the units behavior! Thanks for the help DR Super. Can't believe I've had this problem for so long and solving it was as simple as checking an Ignore Placement Flag. Sheesh....
I have zealots with guns and blades. They can choose between their weapon systems and specific weapons must be researched.
It's fairly straightforward, when you tell the unit to activate the selected weapon, it is an effect instant with a SET effect which orders the unit to morph into the Zealot with gun actor, and then the second effect applies a buff which gives them the appropriate weapon. To deactivate the gun and return to blades, the command is a direct morph back to zealot with blades. All is fine as long as the zealots are not colliding with each other.
I couldn't figure out why but they are always glitching in the game until now. When the zealots are in large groups and the orders are given in MASS to move or the zealots are standing to close Some will not morph properly. I have tried using the disable collision flags to no avail. I also added a buff to morphing units which disables colission and allows them to travel through other units. This does not work either. Another wierd thing that happens. When some of the zealots glitch and dont activate their weapons or morph properly (Or if you have a set of zealots with guns and a set of zealots with blades and you select them all to hit the deactivate (morph back to blades) command. It also orders the zealots without guns to morph to guns. I can't figure out for the life of me why it is ordering the zealots with blades to go to guns. There is no issue order on that ability since its just the morph ability.
Long story short, it is extremely glitchy when you try to group up multiple units and have them morphing from guns to blades and back and forth, and it is all caused by collision with nearby other zealots.
I don't know why simply disabling collission didn't solve the problem. Again I've added separate buffs to disable collision and it still doesn't' fix the problem and none of the flag settings seem to solve it either. If you want I can post a video for you of the issue. I also need to make it so when you have Zealots with guns, and Zealots with blades selected in a mass group and you want to order the zealots with guns to morph to zealots with blades it doesn't also morph the zealots with blades to guns.
Try the Ignore Placement flag.
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
Nice! That solves the initial problem, but still leaves the other issue.
The other issue is pretty serious as well since if you have multiple zealots with different weapons selected, some guns, some blades and you select all of them the ability to morph back to blades orders the ones with guns to go to blades but then orders the ones already on blades back to guns! Can't figure out why its doing that.
It's almost as if when you order the gun units to go to blades, all the blade units get the opposite order to go to guns but I just don't see how that is possible since the going to blade order has no effect tree and how could it trigger a totally different ability to activate?
SOLVED
I have solved this by placing a requirement on the morph ability checking the units behavior! Thanks for the help DR Super. Can't believe I've had this problem for so long and solving it was as simple as checking an Ignore Placement Flag. Sheesh....
You could have also changed the Set ID alias for the ability.
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