Hello SC2Mapster community,
In a map I'm working on, I want to create a beam that connects two actors. But, since they're actors and not units, I can't use abilities or effects to direct the beam and tell where it should be attached...
And so here's my question: is it possible to attach a beam to bare actor through hosting or site ops?
I experimented with this a long time, so far I wasn't able to just connect 2 actors with a beam. You can easily attach a beam to one actor and connect it with another attachment point of the same actor or another actor within the same actor scope. But if both actors are not within one scope, you are pretty much out of luck, at least as far as I know.
In short between two actors that are attachments of a common actor yes but two unrelated actors no. Well maybe with the query region actors and ref set event but have never tried.
Well, those actors that I want connected are created via triggers on map initialization, so I guess they're not sharing a scope. Also, they're supposed to be a single entity (though they can move in relation to each other; one of them basically follows the player's cursor around).
Guess I could just attach the moving actor to the static one, and just move the attachment point instead of the actor itself, if it's possible. Would it work this way?
In short between two actors that are attachments of a common actor yes but two unrelated actors no. Well maybe with the query region actors and ref set event but have never tried.
Oh, wait, you are right. Global references worked just fine, when I tested it. Completely forgot about them, because they were not useable for what I needed.
Well, those actors that I want connected are created via triggers on map initialization, so I guess they're not sharing a scope. Also, they're supposed to be a single entity (though they can move in relation to each other; one of them basically follows the player's cursor around).
For this case, global references should work just fine.
On creation of the cursor actor, send him a Reference Set actor message, with reference source being ::Self and reference name being ::global.something
Then you can use this reference in any Host - Subject fields, for example of your beam's Host Impact field.
Note, that this works like a global trigger variable, so if you set a 2nd reference this way, it will be overwritten. So if you need to set this up for multiple players or something, you need multiple references and probably multiple beam actors.
Hello SC2Mapster community,
In a map I'm working on, I want to create a beam that connects two actors. But, since they're actors and not units, I can't use abilities or effects to direct the beam and tell where it should be attached...
And so here's my question: is it possible to attach a beam to bare actor through hosting or site ops?
I experimented with this a long time, so far I wasn't able to just connect 2 actors with a beam. You can easily attach a beam to one actor and connect it with another attachment point of the same actor or another actor within the same actor scope. But if both actors are not within one scope, you are pretty much out of luck, at least as far as I know.
That being said: Welcome to SC2Mapster :)
In short between two actors that are attachments of a common actor yes but two unrelated actors no. Well maybe with the query region actors and ref set event but have never tried.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Thanks for responses, and for the greeting :)
Well, those actors that I want connected are created via triggers on map initialization, so I guess they're not sharing a scope. Also, they're supposed to be a single entity (though they can move in relation to each other; one of them basically follows the player's cursor around).
Guess I could just attach the moving actor to the static one, and just move the attachment point instead of the actor itself, if it's possible. Would it work this way?
Oh, wait, you are right. Global references worked just fine, when I tested it. Completely forgot about them, because they were not useable for what I needed.
For this case, global references should work just fine.
On creation of the cursor actor, send him a Reference Set actor message, with reference source being ::Self and reference name being ::global.something
Then you can use this reference in any Host - Subject fields, for example of your beam's Host Impact field.
Note, that this works like a global trigger variable, so if you set a 2nd reference this way, it will be overwritten. So if you need to set this up for multiple players or something, you need multiple references and probably multiple beam actors.