Whether Signals act like variables (i.e are they a one off signal, or can newly created actors (created after a signal was 'sent') reference a previous signal?).
Can you create arrays out of them.
If anyone has the time to help that would be much appreciated, whether it be explanations or simply links to tutorials.
Cant find much after searching for quite a while.
There are not so many practical uses for signals. General use is when you can't directly reference target for message in actor events. Or you want to generate event that will trigger actions in multiple different actors of the scope. For example you have 3 actors: A, B, C. Actor A related to actor B somehow (for example it it's ::Host or ::Creator) and actor C has no reference name for A or B. If you want something from actor's A events to trigger actions in actor's C events you need to use signal. It can be also useful for Site (Mover) actor, because you can't detect whenever the mover stops from within the other actors. So you just put MoverArrived ->Signal "Arrival" so other actor's in the scope will know what to do.
I think it's left from some outdated actor system in early engine builds, since you will be able to reference almost any actor from the scope with reference names. You just need to avoid this stuff if it's possible, cuz in 90% cases you won't rly need it.
i am using signals to randomize effects on doodads on my map. since you cannot just pick an actor of type in triggers i send an signal to all actors in a certain area to do something. the ones with the event signal set are hit.
Signals, when taken in the context of a single actor scope, of known properties, are indeed not very useful, as abcdzh has noted. If we consider an actor scope (say, a unit) and some other actors in that scope (models that have been attached to that unit), it is easier to create an alias and send messages to those aliases, or simply send messages directly to them by name.
Where signals are VERY powerful and useful, is when the scope contains actors that are unknown, and you wish them all to react differently to the same event. This rarely occurs simply because it requires knowledge of List actors and Region actors.
With a List actor, you can add other actors to it, and then later, send messages to all the actors in the list. However, when a given event (say an effect) occurs, you may have no idea what actors are actually in the list at the time. For example, when an effect occurs, I want certain Units in the list to turn blue, but I want other actors that are Doodads to turn red. And I want certain unit actors to turn purple. And I want only a specific doodad to turn pink.
I could use a mix of aliases (Send the blue message to the Unit alias, and the red message to doodad alias), and direct messages. But in the context of the list, I can only send messages to the list contents. None of the actors in the list are necessarily in the scope of the list, so sending messages to _Unit would do nothing. Instead, I could have the specific units and doodads be setup to receive a single signal, which will cause them to do the appropriate action. Then in the List actor, I merely need 1 message, to signal the list contents.
Signals are a way of informing all actors of something, instead of directly telling them to do something (Set Color, Set Scale, etc.). In this way, you can safely send signals, and only those who are configured to handle them will receive the message and do stuff, where others will simply ignore it.
Region actors are another one, where you want to send an actor message to all actors in a given region (can be game defined or actor defined, there is a tutorial on the matter). If you want to send a message to turn all of a specific set of trees blue in the region and only specific units red and some of those units you also want to increase in size, you could send a signal. Now, with this example, you could setup those trees and units to have aliases, and just send the 2 messages to each alias instead. However this assumes that all you want to do is send exactly one message to those units and trees (in this case, Set Color), if you needed to send more messages, you would have to duplicate the messages for every type (so trees and units = 2, number of things to do = n, total = 2 * n messages. In this specific case, you would need to create 3 aliases. But with signals, no aliases needed, just setup the units you want to receive the signal, and what to do.
Signals and Aliases are a balancing act, and it depends which side you want to be more complicated, the sender, or the receiver.
I know list and region actors and i must say that list actors themselves are not very usefull. Coloring the doodads is fun but what else? I personaly use them like an outer actor scopes for some complex spells with beam chains.
Hey all,
Finding it hard to understand Signals in Actors;
Not sure how to set them up.
How to reference them.
Whether Signals act like variables (i.e are they a one off signal, or can newly created actors (created after a signal was 'sent') reference a previous signal?).
Can you create arrays out of them.
If anyone has the time to help that would be much appreciated, whether it be explanations or simply links to tutorials. Cant find much after searching for quite a while.
Cheers
There are not so many practical uses for signals. General use is when you can't directly reference target for message in actor events. Or you want to generate event that will trigger actions in multiple different actors of the scope. For example you have 3 actors: A, B, C. Actor A related to actor B somehow (for example it it's ::Host or ::Creator) and actor C has no reference name for A or B. If you want something from actor's A events to trigger actions in actor's C events you need to use signal. It can be also useful for Site (Mover) actor, because you can't detect whenever the mover stops from within the other actors. So you just put MoverArrived ->Signal "Arrival" so other actor's in the scope will know what to do.
I think it's left from some outdated actor system in early engine builds, since you will be able to reference almost any actor from the scope with reference names. You just need to avoid this stuff if it's possible, cuz in 90% cases you won't rly need it.
You can see some example usage in my Spike Bomb ability from map from this topic (look at #4 post): http://www.sc2mapster.com/forums/general/general-chat/68555-collaboration-project-anyone/
Thanks heaps abvdzh
Much appreciated!
@Skobe: Go
i am using signals to randomize effects on doodads on my map. since you cannot just pick an actor of type in triggers i send an signal to all actors in a certain area to do something. the ones with the event signal set are hit.
Signals, when taken in the context of a single actor scope, of known properties, are indeed not very useful, as abcdzh has noted. If we consider an actor scope (say, a unit) and some other actors in that scope (models that have been attached to that unit), it is easier to create an alias and send messages to those aliases, or simply send messages directly to them by name.
Where signals are VERY powerful and useful, is when the scope contains actors that are unknown, and you wish them all to react differently to the same event. This rarely occurs simply because it requires knowledge of List actors and Region actors.
With a List actor, you can add other actors to it, and then later, send messages to all the actors in the list. However, when a given event (say an effect) occurs, you may have no idea what actors are actually in the list at the time. For example, when an effect occurs, I want certain Units in the list to turn blue, but I want other actors that are Doodads to turn red. And I want certain unit actors to turn purple. And I want only a specific doodad to turn pink.
I could use a mix of aliases (Send the blue message to the Unit alias, and the red message to doodad alias), and direct messages. But in the context of the list, I can only send messages to the list contents. None of the actors in the list are necessarily in the scope of the list, so sending messages to _Unit would do nothing. Instead, I could have the specific units and doodads be setup to receive a single signal, which will cause them to do the appropriate action. Then in the List actor, I merely need 1 message, to signal the list contents.
Signals are a way of informing all actors of something, instead of directly telling them to do something (Set Color, Set Scale, etc.). In this way, you can safely send signals, and only those who are configured to handle them will receive the message and do stuff, where others will simply ignore it.
Region actors are another one, where you want to send an actor message to all actors in a given region (can be game defined or actor defined, there is a tutorial on the matter). If you want to send a message to turn all of a specific set of trees blue in the region and only specific units red and some of those units you also want to increase in size, you could send a signal. Now, with this example, you could setup those trees and units to have aliases, and just send the 2 messages to each alias instead. However this assumes that all you want to do is send exactly one message to those units and trees (in this case, Set Color), if you needed to send more messages, you would have to duplicate the messages for every type (so trees and units = 2, number of things to do = n, total = 2 * n messages. In this specific case, you would need to create 3 aliases. But with signals, no aliases needed, just setup the units you want to receive the signal, and what to do.
Signals and Aliases are a balancing act, and it depends which side you want to be more complicated, the sender, or the receiver.
I know list and region actors and i must say that list actors themselves are not very usefull. Coloring the doodads is fun but what else? I personaly use them like an outer actor scopes for some complex spells with beam chains.