I'm trying to create a cloaking field simelar to that of the MotherShips. Everything around invisible except it, and I'd preferably like it to cost energy the longer it stays up but I have no idea how to go about doing this, I've tried to look for the original mothership's ability but, I just cant seem to learn anything of it.
The mother-ship has it set up in a few parts. First, it has a part that searches for any friendly units/structures within a certain radius, then it has a part that temporarily adds a "cloaked" flag to those units/structures,
What you need is an ability, and the effect should be similar. First, it should look for any number of units/structures within a certain radius of your unit. I'd suggest maybe looking at the beams tutorial for a simple way to do this?
Then have that ability set the cloaked flag onto each unit through another effect.
of course, than only solves the issue of cloaking them... Not sure how you would uncloak them... maybe another search for units just outside that range and decloak them? except that would screw up units that are cloaked by themselves...
Anyway, another thing to look into is auras, that might help.
For the purpose of simplicity, this is (Obviously) written as if the unit you were giving the ability to was a Marine. No reason you can't change the unit though.
First, go into the data editor and bring up the behavior tab. Right click and select Add Object. Name it something simple (I used Cloak Field Behavior and CloakFieldBehavior.). Set the Type attribute to Buff and Race to none. Also, make sure Field Values are Set To Parent Value. Now view the created behavior. Under the Behavior tab, scroll down to Alignment and set it as Positive. Scroll down further and set 2 validators as "Can spend energy" and "Has energy". Next, scroll back up and click the Unit tab. Scroll down until you see Vital Regeneration Bonus and set that as -1 (Amount of energy drained per second for sustaining the ability). Now go to the Effect tab and change Effect - Periodic to Mothership - Cloaking Field Search. Only thing you need to do in the Stats tab is check the Hidden box under Flags.
Now, go to the Effect tab in the top left, right click and add object. Name it Marine - Field Effect and ID MarineFieldEffect. View your created effect. Under it's Behavior tab, set it's Behavior to CloakFieldBehavior (Or whatever you named it.). Next, go to the Unit tab and make sure the Value dropdown is set to Target.
After that's done, go to the Abilities tab in the top left. Right click, add object and name it Activate Cloaking Field with ID MarineCloakAbility. Set the ability type to Behavior, Race to None, and Field values to Set to Parent Value. From there, check the Toggle and Transient flags under it's Stats tab. Now, go to the ability tab. Under commands, click the "On" value and check the Send To Selection Flag right under it. Do the same for the "Off" value. Scroll down, and set a default button if you desire. At the bottom, add a value to the Behaviors box and set it as CloakFieldBehavior. Next, go to the Cost tab. Scroll down to the bottom and and under Vitals, set the value of energy to 25 (This is how much energy is used to activate the ability.).
The last set. Yay! Go to the top left Units tab and find the Marine. In it's ability tab, add a value to the first box and set it to Activate Cloaking Field. Now, on the command card, add two buttons. Whatever works. (Okay I lied. I'm working through this as I do it myself and I just found out that I missed something pretty important.) Ehem. Go back to the top left ability tab and find your ability. Go to it's ability tab and select the "On" command value. Scroll down and select a default button. I used Cloaking Field (For the banshee, but it works.). Now, go back to the top and slect the "Off" command value. Set it's default button to Decloak. Now, back to where we were before in the units tab with the marine... Click the button on the command card that you want to activate the ability with. Set it's command type to Ability Command, Requirements set to none, and the Ability to Activate Cloaking Field. Now, the last drop down box, Ability Command, set to Cloaking field. Do the same for the deactivate button except set the Ability Command to Decloak. Now go to the marines Stats tab and set Energy Maximum to 150, Energy Regeneration to whatever, and energy regeneration to 1. Now test it out! It is very rough though, so you will need to go through some more steps to make it your own. But I can't walk you through creativity :D
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I'm trying to create a cloaking field simelar to that of the MotherShips. Everything around invisible except it, and I'd preferably like it to cost energy the longer it stays up but I have no idea how to go about doing this, I've tried to look for the original mothership's ability but, I just cant seem to learn anything of it.
The mother-ship has it set up in a few parts. First, it has a part that searches for any friendly units/structures within a certain radius, then it has a part that temporarily adds a "cloaked" flag to those units/structures,
What you need is an ability, and the effect should be similar. First, it should look for any number of units/structures within a certain radius of your unit. I'd suggest maybe looking at the beams tutorial for a simple way to do this? Then have that ability set the cloaked flag onto each unit through another effect. of course, than only solves the issue of cloaking them... Not sure how you would uncloak them... maybe another search for units just outside that range and decloak them? except that would screw up units that are cloaked by themselves...
Anyway, another thing to look into is auras, that might help.
I'm really too lazy to look this up myself.
Haha, Alright, I'll take a dip into your suggestions and see if I can find something out. Thanks!
For the purpose of simplicity, this is (Obviously) written as if the unit you were giving the ability to was a Marine. No reason you can't change the unit though.
First, go into the data editor and bring up the behavior tab. Right click and select Add Object. Name it something simple (I used Cloak Field Behavior and CloakFieldBehavior.). Set the Type attribute to Buff and Race to none. Also, make sure Field Values are Set To Parent Value. Now view the created behavior. Under the Behavior tab, scroll down to Alignment and set it as Positive. Scroll down further and set 2 validators as "Can spend energy" and "Has energy". Next, scroll back up and click the Unit tab. Scroll down until you see Vital Regeneration Bonus and set that as -1 (Amount of energy drained per second for sustaining the ability). Now go to the Effect tab and change Effect - Periodic to Mothership - Cloaking Field Search. Only thing you need to do in the Stats tab is check the Hidden box under Flags.
Now, go to the Effect tab in the top left, right click and add object. Name it Marine - Field Effect and ID MarineFieldEffect. View your created effect. Under it's Behavior tab, set it's Behavior to CloakFieldBehavior (Or whatever you named it.). Next, go to the Unit tab and make sure the Value dropdown is set to Target.
After that's done, go to the Abilities tab in the top left. Right click, add object and name it Activate Cloaking Field with ID MarineCloakAbility. Set the ability type to Behavior, Race to None, and Field values to Set to Parent Value. From there, check the Toggle and Transient flags under it's Stats tab. Now, go to the ability tab. Under commands, click the "On" value and check the Send To Selection Flag right under it. Do the same for the "Off" value. Scroll down, and set a default button if you desire. At the bottom, add a value to the Behaviors box and set it as CloakFieldBehavior. Next, go to the Cost tab. Scroll down to the bottom and and under Vitals, set the value of energy to 25 (This is how much energy is used to activate the ability.).
The last set. Yay! Go to the top left Units tab and find the Marine. In it's ability tab, add a value to the first box and set it to Activate Cloaking Field. Now, on the command card, add two buttons. Whatever works. (Okay I lied. I'm working through this as I do it myself and I just found out that I missed something pretty important.) Ehem. Go back to the top left ability tab and find your ability. Go to it's ability tab and select the "On" command value. Scroll down and select a default button. I used Cloaking Field (For the banshee, but it works.). Now, go back to the top and slect the "Off" command value. Set it's default button to Decloak. Now, back to where we were before in the units tab with the marine... Click the button on the command card that you want to activate the ability with. Set it's command type to Ability Command, Requirements set to none, and the Ability to Activate Cloaking Field. Now, the last drop down box, Ability Command, set to Cloaking field. Do the same for the deactivate button except set the Ability Command to Decloak. Now go to the marines Stats tab and set Energy Maximum to 150, Energy Regeneration to whatever, and energy regeneration to 1. Now test it out! It is very rough though, so you will need to go through some more steps to make it your own. But I can't walk you through creativity :D