I wanted to ask, how I create a Beam Actor through trigger as I was not yet able to get the Create Actor function to work properly.
At the end it should look like in the Single Connection Screen.
At the Moment I am able to do this with a dummy Behaviour which creates the actor through an actor event.
But since there can be multiple outgoing and incoming beams (bewtween each unit there can only be one beam but there is no max on the incoming beams of different units 2.nd screenshot) and i need to be able to modify each beam on its own, I would like to create them through trigger to be able to store them in an array and then modify them through the Send Message to Actor function.
Thanks for the tip, but I think i did not explain it correct how that should work, as I dont think the search effect would work.
The beams should be created and removed by 2 different abilities. First one adds, 2nd one removes.
The abilities are dummy abilities as the effects are handled by triggers.
At the Moment the abilites also use a 0.5 lasting effect which creates or removes the actor and gives him the source and target.
THe Problem comes when 2 beams are connected with one unit and one of the beams should be removed. At the moment all beams which are connected to that pylon get removed, as I was not able to only destroy that actor which has the same source as the behaviour.
Also the properties as to how the beams have to change (scale, color) are calculated in a trigger, as such i definitly need a way to send a message to each single actor without affecting the others.
That is the reason i hope it is possible to create these actors in the trigger itself, as to be able to have them readily accessable through an array.
I can confirm it is possible to create beams with triggers between 2 actors. However I am having problems finding a way to target them specifically at attachment points or at arbitrary locations with triggers.
The "Host Launch" System of the beam actor controls where it comes from. The "Host Impact" System of the beam actor controls where it goes.
One way of modifying these systems is using the Reference Set actor action. This can be sent as an actor message to an explicit actor using triggers. For example I made the following trigger which successfully attaches a test beam between two pre-placed units for 2 seconds when I press escape.
Actor Test Trigger Events UI - Player Any Player presses Escape key Down with shift Allow, control Allow, alt Allow Local Variables beam actor = No Actor <Actor> Conditions Actions UI - Display "Actor Test" for (All players) to Subtitle area Actor - Create a Test Beam actor in the scope (Actor scope for Mengsk Elite - Blackhammer (Thor) [30.83, 29.63]) with content parameters null, null, null Variable - Set beam actor = (Last created actor) Actor - Send message "RefSet ::global.MedivacHealLaunch ::Self" to actor (Actor for Mengsk Elite - Blackhammer (Thor) [30.83, 29.63]) Actor - Send message "RefSet ::global.MedivacHealImpact ::Self" to actor (Actor for Battlecruiser [23.72, 30.50]) Actor - Send message "RefSet ::HostLaunch ::global.MedivacHealLaunch" to actor beam actor Actor - Send message "RefSet ::HostImpact ::global.MedivacHealImpact" to actor beam actor General - Wait 2.0 Game Time seconds Actor - Send message "Destroy" to actor beam actor
global.MedivacHealLaunch/Impact are being used as temporary storage locations. They could be replaced with any unique global Reference without affecting functionality.
One can add site operations to the beam actor for launch and impact and it will use them when being attached to the two actors. However currently I am unable to find a way to allow triggers to choose an attachment or an arbitrary point to attach the beam to. I am also unable to find a way to more efficiently set Launch and Impact sites without using an intermediate, temporary reference. However this should be sufficient for your needs, even if not perfect.
I will update or make another post if I have any improvement to offer.
One can dynamically set the attachment site operators of the beam by setting the host site op for the appropriate system like...
Actor - Send message "HostSiteOpsSet ::HostLaunch SOpAttachRandomWeapon" to actor beam actor Actor - Send message "HostSiteOpsSet ::HostImpact SOpAttachRandomWeapon" to actor beam actor As example it will attach to a random weapon attachment.
Hello,
I wanted to ask, how I create a Beam Actor through trigger as I was not yet able to get the Create Actor function to work properly.
At the end it should look like in the Single Connection Screen.
At the Moment I am able to do this with a dummy Behaviour which creates the actor through an actor event.
But since there can be multiple outgoing and incoming beams (bewtween each unit there can only be one beam but there is no max on the incoming beams of different units 2.nd screenshot) and i need to be able to modify each beam on its own, I would like to create them through trigger to be able to store them in an array and then modify them through the Send Message to Actor function.
You could have a persistent that sends multiple beams that way. Or have a search effect and have it send a beam every time it finds something.
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here
Thanks for the tip, but I think i did not explain it correct how that should work, as I dont think the search effect would work.
The beams should be created and removed by 2 different abilities. First one adds, 2nd one removes.
The abilities are dummy abilities as the effects are handled by triggers.
At the Moment the abilites also use a 0.5 lasting effect which creates or removes the actor and gives him the source and target.
THe Problem comes when 2 beams are connected with one unit and one of the beams should be removed. At the moment all beams which are connected to that pylon get removed, as I was not able to only destroy that actor which has the same source as the behaviour.
Also the properties as to how the beams have to change (scale, color) are calculated in a trigger, as such i definitly need a way to send a message to each single actor without affecting the others.
That is the reason i hope it is possible to create these actors in the trigger itself, as to be able to have them readily accessable through an array.
I can confirm it is possible to create beams with triggers between 2 actors. However I am having problems finding a way to target them specifically at attachment points or at arbitrary locations with triggers.
The "Host Launch" System of the beam actor controls where it comes from.
The "Host Impact" System of the beam actor controls where it goes.
One way of modifying these systems is using the Reference Set actor action. This can be sent as an actor message to an explicit actor using triggers. For example I made the following trigger which successfully attaches a test beam between two pre-placed units for 2 seconds when I press escape.
Actor Test Trigger
Events
UI - Player Any Player presses Escape key Down with shift Allow, control Allow, alt Allow
Local Variables
beam actor = No Actor <Actor>
Conditions
Actions
UI - Display "Actor Test" for (All players) to Subtitle area
Actor - Create a Test Beam actor in the scope (Actor scope for Mengsk Elite - Blackhammer (Thor) [30.83, 29.63]) with content parameters null, null, null
Variable - Set beam actor = (Last created actor)
Actor - Send message "RefSet ::global.MedivacHealLaunch ::Self" to actor (Actor for Mengsk Elite - Blackhammer (Thor) [30.83, 29.63])
Actor - Send message "RefSet ::global.MedivacHealImpact ::Self" to actor (Actor for Battlecruiser [23.72, 30.50])
Actor - Send message "RefSet ::HostLaunch ::global.MedivacHealLaunch" to actor beam actor
Actor - Send message "RefSet ::HostImpact ::global.MedivacHealImpact" to actor beam actor
General - Wait 2.0 Game Time seconds
Actor - Send message "Destroy" to actor beam actor
global.MedivacHealLaunch/Impact are being used as temporary storage locations. They could be replaced with any unique global Reference without affecting functionality.
One can add site operations to the beam actor for launch and impact and it will use them when being attached to the two actors. However currently I am unable to find a way to allow triggers to choose an attachment or an arbitrary point to attach the beam to. I am also unable to find a way to more efficiently set Launch and Impact sites without using an intermediate, temporary reference. However this should be sufficient for your needs, even if not perfect.
I will update or make another post if I have any improvement to offer.
Here's one i found from mapster and made a action for it.
http://www.sc2mapster.com/forums/development/data/33401-solved-trigger-controlled-beam-actor/
The attachment doesn't seem to work so here's a dropbox link. https://www.dropbox.com/s/w4a7wl41e7t3v8d/Trigger Beam.SC2Map?dl=0
Ops posted in wrong thread...
One can dynamically set the attachment site operators of the beam by setting the host site op for the appropriate system like...
Actor - Send message "HostSiteOpsSet ::HostLaunch SOpAttachRandomWeapon" to actor beam actor
Actor - Send message "HostSiteOpsSet ::HostImpact SOpAttachRandomWeapon" to actor beam actor
As example it will attach to a random weapon attachment.