How do I make beams attach to all enemy players? I got it firing on enemies, but I don’t know how to make it hit all enemies simultaneously and destroy the beam if there are no targets available.
Currently working on a workshop game mode that is vastly incomplete. I have a link to a google doc describing it, although the document is really roughshod since I stopped caring so much after a while:_https://docs.google.com/document/d/1QqW5cVRFNg7Kox5W0ylFNhAoBUP7E6TeSOl0d0cHzZY/edit?usp=sharing
Underscored because my trust level isn’t high enough
I don’t really know, what you’re trying to make, but have you tried to use array?
Like you can make an loop what will create beams between you and each your enemy. When you haven’t enemies the loop will disappear after the end of the loop.
1 Like
Do you mean to create a beam that will start from your hero and hit all opposite team players if you can see them, right?
More info about me and my game mods you can find here.
Feel free to comment my ideas.
I think I know an alternative solution, wich might work well but requires a huge calculation.
Its only worth it if rankserpentY’s solution doesn’t work for you.
1 Like
If yes then there is a trick that requires no calculations at all.
I imagine the OP wants a beam like Symm/Zarya/Echo beam but it goes through enemies.
All at same time or one by one? Both can be done for real but required an additional specification.
I don’t know. As example you could show the way for the first
So the task is to make a beam using logic one to many, right? Once a new hero come close enough a new beam will be activated to that hero and once it goes away (behind a wall) the beam should be destroyed. Am I right? So one Zarya can “beam” 6 players of an opposite team (regardless damage or other effect so far).
After rereading the opening post and your new post I am not sure anymore what OP actually wants tbh. I thought about something completely different than you: A single beam that simply goes through multiple targets and doesnt stop at the first one. But this might be wrong and your idea might be true. I am a little confused.
I think the OP has to clarify what he wants first.
Wow, it can be a new skill of a new Hero (chain lighting). Ah I already want to try to make it. Before I wanted to try to create a dynamic menu for hero change outside a spawn using the last update’s options. Still I need to finish working on Annoying race game mod heh…
I want a beam that hits multiple enemies in different places all at the same time, though knowing how to have a beam that penetrates enemies would be helpful. I’m trying to implement a beam that does damage as her primary fire though. Currently my mercy ult is working as a radius that damages enemies, though I want the beam to be projected to the enemies in the radius
Oh well thats easy. Like rankserpentY wrote, loop over the array “players within radius” and create a beam in each iteration.
I can’t seem to get it, can you give me like the exact directions as they are presented in game?
You have the area center (player variable(event player, center)) and the area radius (player variable(event player, radius))
- set player variable(event player, players, players within radius(player variable(event player, center), player variable(event player, radius), opposite team of(team of(event player)), surfaces))
- for(player variable(event player, loopCounter), 0, count of(player variable(event player, players)))
- create beam effect(player variable(event player, center), value in array(player variable(event player, players), player variable(event player, loopCounter)), good beam, red, visible to and position)
- end()
If the center position is at a player you use:
set player variable(event player, players, remove from array(players within radius(...), *the center player*))
I still don’t get it? what do all these variables and array do, and how do they work? I’m clueless. I tried looking for those options you mentioned but I couldn’t find them
Do you want something similar to Mercy’s ultimate, but the beams are damage beams and go from one enemy to multiple others?
I want beams that lock onto enemies around Mercy and damage them. But when I tried doing that on my own, the beam didn’t attach to multiple enemies, it only attached to 1 enemy in the radius. I
Oh wait, I think thats impossible in a loop, since you have to set the reevaluation to “visible to” only in a loop, but then the beams are not connected with the enemies.
I am afraid you have to do 6 times “if(distance between mercy and the player is lower than the radius + the player is alive + the player is in line of sight to mercy) then (create the beam)”
Or you can filter an opposite team with your conditionals and work with a filtered array manually.