I try to make a point defence drone become an ability that can be toggled on and off. I try to give it to the science vessel. But I need some help with this cause things are not working : /
It works like this: When the ability is turned on, the science vessel will work like a point defence drone and shoot lasers at enemy projectiles. Every shot drains mana from the vessel. At any point, the player may turn off the ability. (So it can be on forever if the player wishes.) Also a white border shall be visible around the vessel, to show the area that the ability reaches. (Same thing as a sieged tank shows it's attack range with a white circle.)
The vessel can move while the ability is turned on.
Give the science vessel the drones weapon, this is what it uses. Then in the weapon flags, disable it. Make a behavior that enables the weapon in the Modifications. Then make a Behavior type ability that adds that behavior to the science vessel when it casts it. Set the ability flags to Toggle and Transient. Give the science vessel the ability and a button to use it.
As for moving while it attacks, check out how this is done with the Phoenix weapon.
Creating a circle around it is done by making a Range actor. Look for other Range actors and copy what they do. I think, if I remember, that the event you want is Unit State Change.Selected whatever it is, it is usually found in any standard unit actor among the gray events.
I would just use a Behavior ability that toggles a Buff which uses a periodic Search Area effect that then uses a Launch Missile that on impact does the Modify Unit effect or uses the modify unit effect directly from the search.
I have done almost all your steps TrenchaunT, but I have three questions:
1. Where do I disable the weapon the Vessel uses? I have added a attack ability and in "combat weapons +" I gave it the point defence lazer and tower. But I can´t find where to disable it... T_T
2. How can I do to turn off the ability? Cause right now the ability can be turned on, but not turned off..
3. I have looked at the Phoenixs weapon. I have disabled Only fire at attack target & Only fire while attacking. Still it only works when the Vessel is standing still. Any ideas?
1. Under the Weapons data type is a field called Weapon - Options, there is a flag called Disable.
2. Check you gave the off button a default button on the ability itself.
3. Remove the only fire while attacking flag.
Still say my method would be more effective. Also just do like the A.R.E.S. unit and use the buff to add the whole weapon, it looks alot vetter visual wise.
I can now activate the ability and it works ingame. But I can not deactivate it.
I have given the ability a turn off and turn on button in the "ability: commands+" field of the ability. I have boxed "Send to selection" and "Show in glossary" for turn on. Only "Send to selection" to turn off. I have also added two command cards to the science vessel, one for turn on and one for turn off. I have also created a custom button for the ability. Still no turn off button appears.. :(
Despite I have unboxed "Only fire when attacking" the vessel will only use it weapon once it is standing still. I have tried lots of things but it will only fire it´s weapon when it is standing still. Any ideas what might be wrong?
I personally prefer to disable and enable the weapon if the weapon belongs to that unit to some degree. I find it more aesthetically pleasing. I would only give the weapon by behavior if the weapon were shared by many units, or if it somehow was not part of the unit's propria.
@Kabelkorven:
The Turn Off button, if its not showing up but you are sure you set an icon for in the Ability's Commands+ and set it right in the Command Card, then it's gotta be the Toggle flag, as the Doc says, unless you accidentally set a requirement on it.
I now fixed so the ability can be turned on and turned off. Thanks for your help.
But the attack still only works when the vessel is standing still. I've tried a lot of stuff but nothing seems to work. Any ideas?
I try to add a range actor and I have looked at other abilities/units to see how it works. The white circle appears once an ability is choosen to be casted, to show the cast range of the spell. I want it to be permanent on, for as long as the vessel has it´s ability activated. (A player can see how large area the anti missile defence ability covers.)
I try to make a point defence drone become an ability that can be toggled on and off. I try to give it to the science vessel. But I need some help with this cause things are not working : /
It works like this: When the ability is turned on, the science vessel will work like a point defence drone and shoot lasers at enemy projectiles. Every shot drains mana from the vessel. At any point, the player may turn off the ability. (So it can be on forever if the player wishes.) Also a white border shall be visible around the vessel, to show the area that the ability reaches. (Same thing as a sieged tank shows it's attack range with a white circle.) The vessel can move while the ability is turned on.
How on earth can this be done?
@Kabelkorven:
Give the science vessel the drones weapon, this is what it uses. Then in the weapon flags, disable it. Make a behavior that enables the weapon in the Modifications. Then make a Behavior type ability that adds that behavior to the science vessel when it casts it. Set the ability flags to Toggle and Transient. Give the science vessel the ability and a button to use it.
As for moving while it attacks, check out how this is done with the Phoenix weapon.
Creating a circle around it is done by making a Range actor. Look for other Range actors and copy what they do. I think, if I remember, that the event you want is Unit State Change.Selected whatever it is, it is usually found in any standard unit actor among the gray events.
I would just use a Behavior ability that toggles a Buff which uses a periodic Search Area effect that then uses a Launch Missile that on impact does the Modify Unit effect or uses the modify unit effect directly from the search.
Use a Range type actor.
@TrenchaunT: Go
Would not just adding the weapon via the behaviour be simpler?
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
I have done almost all your steps TrenchaunT, but I have three questions:
1. Where do I disable the weapon the Vessel uses? I have added a attack ability and in "combat weapons +" I gave it the point defence lazer and tower. But I can´t find where to disable it... T_T
2. How can I do to turn off the ability? Cause right now the ability can be turned on, but not turned off..
3. I have looked at the Phoenixs weapon. I have disabled Only fire at attack target & Only fire while attacking. Still it only works when the Vessel is standing still. Any ideas?
1. Under the Weapons data type is a field called Weapon - Options, there is a flag called Disable.
2. Check you gave the off button a default button on the ability itself.
3. Remove the only fire while attacking flag.
Still say my method would be more effective. Also just do like the A.R.E.S. unit and use the buff to add the whole weapon, it looks alot vetter visual wise.
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
I can now activate the ability and it works ingame. But I can not deactivate it.
I have given the ability a turn off and turn on button in the "ability: commands+" field of the ability. I have boxed "Send to selection" and "Show in glossary" for turn on. Only "Send to selection" to turn off. I have also added two command cards to the science vessel, one for turn on and one for turn off. I have also created a custom button for the ability. Still no turn off button appears.. :(
Despite I have unboxed "Only fire when attacking" the vessel will only use it weapon once it is standing still. I have tried lots of things but it will only fire it´s weapon when it is standing still. Any ideas what might be wrong?
Is the Toggle flag active on 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
@DrSuperEvil:
I personally prefer to disable and enable the weapon if the weapon belongs to that unit to some degree. I find it more aesthetically pleasing. I would only give the weapon by behavior if the weapon were shared by many units, or if it somehow was not part of the unit's propria.
@Kabelkorven:
The Turn Off button, if its not showing up but you are sure you set an icon for in the Ability's Commands+ and set it right in the Command Card, then it's gotta be the Toggle flag, as the Doc says, unless you accidentally set a requirement on it.
I now fixed so the ability can be turned on and turned off. Thanks for your help.
But the attack still only works when the vessel is standing still. I've tried a lot of stuff but nothing seems to work. Any ideas?
I try to add a range actor and I have looked at other abilities/units to see how it works. The white circle appears once an ability is choosen to be casted, to show the cast range of the spell. I want it to be permanent on, for as long as the vessel has it´s ability activated. (A player can see how large area the anti missile defence ability covers.)
Any clues?
Diamondback tankis a good examle because next to the weapon options, weapon arc and turret can be the cause.
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