The problem is if you put several Raynor (sniper) in the map, when you use Penetrator Round, the red indicator laser will always come out from the last placed Raynor. I searched for solution and found this thread:
The problem is caused by the actor of Penetrator Round use a global variable to set its location, and the old version of that global is replaced by newer version when a new Raynor is put into the map. The solution suggested there only works if there is one version of Raynor duplicate for each Raynor you are going to place on the map. This becomes problematic because my map have a hero that can use Penetrator Round, who can be chosen by all 10 players, so I'm going to make 10 version of that unit. Besides, I need to create new copy of that unit in the game, which will make it buggy again.
Do anyone know how to solve this, or is this impossible to have the Penetrator Round red indicator laser to work correctly for multiple units?
i would like to know this too, right now i use penetrator round and theres no limit to the amount of raynors that can be on the battlefield for my map.
I played around a little and got somewhat of a working solution. Its far from perfect, but it does not require to duplicate the unit.
However it is still not working for infinite amounts of units and it requires triggers (only to set the references, so nothing performance-heavy) as well as a duplication of the splat actor and some site operations for each unit (3 actors per unit total).
I will try some more things, until I will share the results. Currently it works properly, but its really messy.
it is "impossible" currently to make it work without duplicating the ability. If you check the other threads on this topic youll see I was one of the people that needed this badly, however I spent hours and hours looking over his ability. It puts the unit in a "global" var, it then checks this var to make them beam. Problem is, when a new unit is put on the map, it replaces the old one in this var. Thus the only way to fix this is to handle it 100% via triggers, or to duplicate the unit AND the ability (and it has way to many parts for that to be practical,)
Rollback Post to RevisionRollBack
Random Information
Tutorials - Map Development - Galaxy wiki
|Issues? PM me|
Well, since I did not find a better solution, this is what I got so far:
The marines are of the same unit type, the ability is not duplicated either. A trigger is required (I don't know of another way to set the global references dynamically) and 3 actors need to be duplicated and properly re-linked for every additional targetline.
The trigger only sets some global references at map initialization; it should have no effect on performance at all.
Also the unit's actor events get some additions per additional line, so this is not an easy or a good solution, its just the only one I know of without duplicating the unit itself (it might not even be less work overall).
If you want to use this yourself, you might want to adjust the trigger; right now it only works for pre-placed units (should be easy to take units spawned at runtime into account), and you need to do all those actor modifications and duplications.
Triggering the whole thing does not work, because I do not know a way to check, when an ability is targeted (maybe a general check for a clicked button? Well, in combination with the required mouse tracking for the target line, this would probably cause performance issues)
The problem is if you put several Raynor (sniper) in the map, when you use Penetrator Round, the red indicator laser will always come out from the last placed Raynor. I searched for solution and found this thread:
http://forums.sc2mapster.com/development/map-development/6738-bug-with-raynor-penetrator-round/?unread
The problem is caused by the actor of Penetrator Round use a global variable to set its location, and the old version of that global is replaced by newer version when a new Raynor is put into the map. The solution suggested there only works if there is one version of Raynor duplicate for each Raynor you are going to place on the map. This becomes problematic because my map have a hero that can use Penetrator Round, who can be chosen by all 10 players, so I'm going to make 10 version of that unit. Besides, I need to create new copy of that unit in the game, which will make it buggy again.
Do anyone know how to solve this, or is this impossible to have the Penetrator Round red indicator laser to work correctly for multiple units?
/bump
anyone know?
bump. surely a hero will come to rescue?
Is there a way to use local rather than global??
i would like to know this too, right now i use penetrator round and theres no limit to the amount of raynors that can be on the battlefield for my map.
I played around a little and got somewhat of a working solution. Its far from perfect, but it does not require to duplicate the unit.
However it is still not working for infinite amounts of units and it requires triggers (only to set the references, so nothing performance-heavy) as well as a duplication of the splat actor and some site operations for each unit (3 actors per unit total).
I will try some more things, until I will share the results. Currently it works properly, but its really messy.
@Kueken531: Go
If your method works for finite number of units, would you mind sharing it?
it is "impossible" currently to make it work without duplicating the ability. If you check the other threads on this topic youll see I was one of the people that needed this badly, however I spent hours and hours looking over his ability. It puts the unit in a "global" var, it then checks this var to make them beam. Problem is, when a new unit is put on the map, it replaces the old one in this var. Thus the only way to fix this is to handle it 100% via triggers, or to duplicate the unit AND the ability (and it has way to many parts for that to be practical,)
@Molsterr: Go
I'm also interested in any solutions for this problem. In my case, I worked around it by removing the targeting line altogether.
bump
@TwilightMarine: Go bump
Well, since I did not find a better solution, this is what I got so far:
The marines are of the same unit type, the ability is not duplicated either. A trigger is required (I don't know of another way to set the global references dynamically) and 3 actors need to be duplicated and properly re-linked for every additional targetline.
The trigger only sets some global references at map initialization; it should have no effect on performance at all.
Also the unit's actor events get some additions per additional line, so this is not an easy or a good solution, its just the only one I know of without duplicating the unit itself (it might not even be less work overall).
If you want to use this yourself, you might want to adjust the trigger; right now it only works for pre-placed units (should be easy to take units spawned at runtime into account), and you need to do all those actor modifications and duplications.
Triggering the whole thing does not work, because I do not know a way to check, when an ability is targeted (maybe a general check for a clicked button? Well, in combination with the required mouse tracking for the target line, this would probably cause performance issues)