Actors only deal with stuff that cannot change the outcome of the game in any way, like graphics and audio.
Use Behaviors/Effects/Abilities/etc to change the gameplay. You could for example make a weapon add a stacking behavior every time the unit uses it's weapon. When the behavior reaches a certain number, the unit is out of ammo. Remove the behavior stack to reload his weapon.
You can't change these things in the sc2 editor as far as I know. There are a number of things that are built into a model, and this seem to be one of them. Export the model and open it in a 3d model editor if you want to dig deeper into this.
I set the Engineering Bay model to Sensor Tower and had it's opacity set to 0 at Actor Creation. I increased it's scale a little to match the shape of the Vespene Tank.
Then created the model addition actor Vespene Tank Model which is attached to the Engineering Bay. This actor should not inherit opacity, model scale or scale, in order for these values to be independent from the Sensor Tower
There are a lot of selection actors that you can check out by searching for "select" among the actors in the data editor. I haven't experimented with them, but I imagine you can create one in an event for the model you want to use it for.
There are also various selection events among the default events that are created for any generic unit actor that you might want to look into.
I'm talking about abilities that are grayed out just because their requirements (in the data editor) are not met.
A few examples are how
you can't build Photon Cannons without Forge
you can't build Marauders without an attached Tech Lab
How can you check whether the buttons are grayed out, without checking for the requirements themselves? (As this would require a lot of work to cover all the different abilities with their various requirements)
The code I posted is just example code. Triggering ability must be replaced with your ability variable.
SetVariableVariable:scope//A string variableValue:CatalogEntryScope//This is the catalog function you must use to retrieve an ability's scopeCatalog:Abilities//Here you select the data type of the entry you want to retrieve the scope from.Entry:ConvertGameLinkToString//The entry must be written in string form, so we convert the ability to a string. An ability is a game link.Value:AbilityOfAbilityCommand//Here you can specify the ability directly if you have it in a variable, or you can get the ability by using the function 'Ability Of Ability Command'.AbilityCommand:TriggeringAbilityDebug-Display(Text(scope))asdebugoutputusingType1,andDodisplayitinthegamewindow//it's a good idea to debug you code before you use it. Check what scope is and then write the code for the switch afterwards.
I don't know if the comments will do any good. Basically, the function Catalog Entry Scope takes an ability/unit/other object and gives you the type of that object as you see it in the data editor after you press Ctrl + D.
Be sure to add all the ability types you need in the switch. I just added the two I use the most as an example.
Edit: By the way, this method will not differentiate between unit target and point target abilities, since that is defined in the effect run by the ability. If you need this functionality you could use catalog functions to dig deeper into the ability and find it's target in the effects used by it. Although, this is not a task to take lightly. With the various ability types and effect types, the code is bound to get very complex, really fast. Only do it if you have no other way.
It's for a system that needs to know if an ability, out of a pool of many different possibilities, is available for use.
I won't go into details, since it is quite elaborate. Let's just say being able to tell if an ability meets it's requirements or not would help immensely
The only effect which controls what targets an ability can have, is the immediate effect run by this ability. To keep the ability unit targetable while still having it damage at a point, simply create a chain like this:
0
Actors only deal with stuff that cannot change the outcome of the game in any way, like graphics and audio.
Use Behaviors/Effects/Abilities/etc to change the gameplay. You could for example make a weapon add a stacking behavior every time the unit uses it's weapon. When the behavior reaches a certain number, the unit is out of ammo. Remove the behavior stack to reload his weapon.
0
Bump
0
@Sherlia: Go
You can't change these things in the sc2 editor as far as I know. There are a number of things that are built into a model, and this seem to be one of them. Export the model and open it in a 3d model editor if you want to dig deeper into this.
0
@Sherlia: Go
Sure.
I set the Engineering Bay model to Sensor Tower and had it's opacity set to 0 at Actor Creation. I increased it's scale a little to match the shape of the Vespene Tank.
Then created the model addition actor Vespene Tank Model which is attached to the Engineering Bay. This actor should not inherit opacity, model scale or scale, in order for these values to be independent from the Sensor Tower
0
You could try to attach a model that has roughly the same shape as your custom model, and then set the attachment's opacity to 0.
0
@Tudentau: Go
Yeah, the fog of war data seemed very lacking.
How do you tint all fog of war by the way?
Edit: Oh, I didn't realize the see through fog of war color was controlled by the black mask color
0
There are a lot of selection actors that you can check out by searching for "select" among the actors in the data editor. I haven't experimented with them, but I imagine you can create one in an event for the model you want to use it for.
There are also various selection events among the default events that are created for any generic unit actor that you might want to look into.
0
Thanks, but that won't help me unfortunately.
I'm talking about abilities that are grayed out just because their requirements (in the data editor) are not met.
A few examples are how
How can you check whether the buttons are grayed out, without checking for the requirements themselves? (As this would require a lot of work to cover all the different abilities with their various requirements)
0
When you move away from an area you have explored, the fog of war covers up the area you were just in. Is it possible to change the color of this fog?
0
Bump
0
@Simbob: Go
The code I posted is just example code. Triggering ability must be replaced with your ability variable.
I don't know if the comments will do any good. Basically, the function Catalog Entry Scope takes an ability/unit/other object and gives you the type of that object as you see it in the data editor after you press Ctrl + D.
Be sure to add all the ability types you need in the switch. I just added the two I use the most as an example.
Edit: By the way, this method will not differentiate between unit target and point target abilities, since that is defined in the effect run by the ability. If you need this functionality you could use catalog functions to dig deeper into the ability and find it's target in the effects used by it. Although, this is not a task to take lightly. With the various ability types and effect types, the code is bound to get very complex, really fast. Only do it if you have no other way.
0
Bump
0
@Simbob: Go
Check the ability's scope, and use a switch to differentiate between the different target types.
0
@SouLCarveRR: Go
It's for a system that needs to know if an ability, out of a pool of many different possibilities, is available for use.
I won't go into details, since it is quite elaborate. Let's just say being able to tell if an ability meets it's requirements or not would help immensely
0
@PatchOne: Go
The only effect which controls what targets an ability can have, is the immediate effect run by this ability. To keep the ability unit targetable while still having it damage at a point, simply create a chain like this:
Ability -> Set Effect (Target: Unit) -> Damage Effect (Target: Point)
The damage effect will target the point of the target unit's position
Edit: However, from my testing; a damage effect with Target Unit can still deal damage to an area.