Below is a simple tutorial on how to reference an actor from another actor via actor events or even triggers.
1. Referencing actor from unit actor with triggers via string or Actor ID.
Example Usage
Create a trigger with the following and place a few Oracles as well as some enemy Siege tanks in your map.
Event: Any Unit has Revealed change Create
Actions: Send message "SetTintColor 255,0,0" to actor (Actor connected to (Actor for (Triggering Unit) via reference "OracleRevelationBehaviorModel")
Do note that the "OracleRevelationBehaviorModel" string is based on the Actor ID.
Next, go to your map and use the Oracle's Revelation ability to reveal the enemy siege tanks. You will notice that the blue reveal model above the tanks now becomes red.
2. Referencing actor from unit actor with triggers via global system referencing.
Do note that a global actor can only be used to reference one actor at a given time.
Example Usage
Place a few Oracles as well as some enemy Siege tanks as in Example 1 in the above.
Next, go to the Oracle Revelation Behavior Model Actor, and under Actor Events, add in the following:-
Actor Creation
-> RefSet ::global.revelationtest ::Self
Refer to the second attachment as below.
Then, create a trigger with the following:-
Event: Any Unit has Revealed change Create
Actions: Send message "SetTintColor 255,0,0" to actor (Actor connected to (Actor for (Triggering Unit) via reference "::global.revelationtest")
Go to your map and use the Oracle's Revelation ability to reveal the enemy siege tanks. You will then realize that there is only one blue reveal model above the siege tanks that becomes red. This shows that global reference will only reference one actor at a time.
3. Referencing actor from actor via target referencing.
Example Usage
Place a few Tempests in your map. Then go to the Tempest's Unit Actor and under Actor Events, add in the following:-
Actor Creation
-> Target:StormSphereAttachment
-> SetTintColor 255,0,0
Refer to the fourth attachment as below.
You will notice that the Tempests' blue sphere model now turns red.
4. Referencing actor from actor via signal.
Example Usage
Place a few Bunkers in your map. Then go to the Bunker's Unit Actor and under Actor Events, add in the following:-
Actor Creation
-> Target:OracleRevelationBehaviorModel
-> Signal Revelation
Refer to the sixth attachment as below.
Then, go to the Oracle Revelation Behavior Model Actor and under Actor Events, add in the following:-
Signal.*.Revelation
-> Create
You will notice that a blue reveal model is attached to the bunkers' overhead as shown.
Conclusion
With the 4 examples as given, I do hope that this simple tutorial will at least help those who still struggle at this topic.
Lastly, thanks.
ATTACHMENTS
Referencing actor from unit actor with triggers via ID string
Second Attachment A
Referencing actor from unit actor with triggers via Global System referencing
Fourth Attachment
Referencing actor from actor via target referencing
Hi, guys,
Below is a simple tutorial on how to reference an actor from another actor via actor events or even triggers.
1. Referencing actor from unit actor with triggers via string or Actor ID.
Example Usage
Create a trigger with the following and place a few Oracles as well as some enemy Siege tanks in your map.
Event: Any Unit has Revealed change Create
Actions: Send message "SetTintColor 255,0,0" to actor (Actor connected to (Actor for (Triggering Unit) via reference "OracleRevelationBehaviorModel")
Do note that the "OracleRevelationBehaviorModel" string is based on the Actor ID.
Next, go to your map and use the Oracle's Revelation ability to reveal the enemy siege tanks. You will notice that the blue reveal model above the tanks now becomes red.
2. Referencing actor from unit actor with triggers via global system referencing.
Do note that a global actor can only be used to reference one actor at a given time.
Example Usage
Place a few Oracles as well as some enemy Siege tanks as in Example 1 in the above.
Next, go to the Oracle Revelation Behavior Model Actor, and under Actor Events, add in the following:-
Actor Creation
-> RefSet ::global.revelationtest ::Self
Refer to the second attachment as below.
Then, create a trigger with the following:-
Event: Any Unit has Revealed change Create
Actions: Send message "SetTintColor 255,0,0" to actor (Actor connected to (Actor for (Triggering Unit) via reference "::global.revelationtest")
Go to your map and use the Oracle's Revelation ability to reveal the enemy siege tanks. You will then realize that there is only one blue reveal model above the siege tanks that becomes red. This shows that global reference will only reference one actor at a time.
3. Referencing actor from actor via target referencing.
Example Usage
Place a few Tempests in your map. Then go to the Tempest's Unit Actor and under Actor Events, add in the following:-
Actor Creation
-> Target:StormSphereAttachment
-> SetTintColor 255,0,0
Refer to the fourth attachment as below.
You will notice that the Tempests' blue sphere model now turns red.
4. Referencing actor from actor via signal.
Example Usage
Place a few Bunkers in your map. Then go to the Bunker's Unit Actor and under Actor Events, add in the following:-
Actor Creation
-> Target:OracleRevelationBehaviorModel
-> Signal Revelation
Refer to the sixth attachment as below.
Then, go to the Oracle Revelation Behavior Model Actor and under Actor Events, add in the following:-
Signal.*.Revelation
-> Create
You will notice that a blue reveal model is attached to the bunkers' overhead as shown.
Conclusion
With the 4 examples as given, I do hope that this simple tutorial will at least help those who still struggle at this topic.
Lastly, thanks.
The sixth to last attachment for Point 4 in the first post above as attached.