Hey all. Here's the problem: I have a barracks with 2 attached turrets using the auto-turret model. They attach, fire, and damage correctly. I was following Prozaicmuze's tutorial here to get it functioning. So far, all is well.
The issue I have now is that if the barracks in question is pre-placed, then the turrets rotate freely when idle, and faces to fire when engaged, all as it should. But, if the barracks is built, or if something upgrades to the barracks, the turrets won't rotate. They will still fire and damage appropriately, but they won't rotate when idle or face their targets when firing. I only found one other thread about this, here, and unfortunately for me, my turret actor events are correct.
I have run out of troubleshooting ideas. Has anyone else run into this issue? Have I missed some blatantly obvious option? Any help would be awesome!
Thanks.
Edit: Youtube video demonstrating the issue here:
I apologize for the length (4 min), but it was an attempt to capture several instances of the behavior.
No, there was no turrets in the combat - turrets section. Only the combat - weapons section. However, after trying to add the turrets into the combat - turrets entry on the unit, there was no change.
And I do have the turret.enable > create event in a turret actor, one for each turret. I also have the turret objects themselves assigned to use the correct actors respectively.
I've messed around with numerous fields quite a bit with no luck. Also, I've discovered even stranger behaviors with the turrets. I've attached a video to the OP to better illustrate, but to describe it briefly, now the turrets work SOMETIMES when upgrading from another lower tier barracks. I've tested it 3 more times in addition to the 3 in the video, and it seems that 2 out of 3 times they work on upgrade. They never work on building the unit from scratch. So strange....
Edit: Also, with further research, I've found that if the turrets are created using the unit.creation event instead of the unit.birth event, they will turn correctly when the unit is built from the command menu. However, they will be floating above the unit during it's construction (which I can work around by setting opacity), however, they do NOT work when upgrading from the lower tier barracks.
That event already exists. The turrets being created after the upgrade completes is how I know that event is working.
Edit: Perhaps, though, instead of having the AbilMorph.*.finish > Create on the turret actor, would it work if I put the AbilMorph.*.Finish on the barracks actor, and had a target to the turret actor?
While the changing the events around as mentioned above did also create the turret, it had no effect on the rotation. Excuse me while a nerd-rage on my desk for a moment.....
It occurred to me that the issue could be caused activating multiple turrets at the same time that are attached to the same host. I tested this by doing the following:
I removed both the create event listed above from the AdvRaxTurretNorth actor (that creates it at morph finish), and the UnitBirth.AdvancedBarracks create event (again from the AdvRaxTurretNorth actor, the actor for the turret itself). Basically I removed any and all creation events from the North Turret actor, while allowing the South Turret actor to create itself as it always has.
Instead, I added these events to the AdvancedBarracks actor:
UnitBirth.AdvancedBarracks
TimerSet 5.000000 MakeTurret
TimerExpired
TimerName MakeTurret
Create AdvRaxTurretNorth
AbilMorph.*.Finish
MorphTo AdvancedBarracks
TimerSet 5.000000 MakeTurret2
TimerExpired
TimerName MakeTurret2
Create AdvRaxTurretNorth
The result of this was the creation of the north turret was delayed by 5 seconds. The south turret was created by the same events as before. The south turret still rotated on the pre-placed model, and did not rotate on the upgraded model or the built model. The north turret did not rotate on any of these models.
Breaking it further, however, has helped me understand what is not going wrong at least....
So, after further troubleshooting, I've become convinced this is an issue with turret object not activating properly when the turret is created. I suspect error is caused because the turret in question is an attachment actor type, and not a unit actor type. I'm not 100% on this, but I suspect as well that when the modelAddition actor is created, the turret object doesn't always see it's creation (due to hierarchical issues), and therefore doesn't enable itself.
I think this might be a bug.
To bypass this, I have tried to use triggers to add the weapons onto the unit after it's creation, with no luck. I've also looking into using triggers to send the turret object a message when the unit is created, but there is currently no way to address a turret object through triggers (that I could find, anyway).
I have no other ideas for working around this issue. I will be reporting it to blizzard as a potential bug.
I am still interested in hearing from anyone who has any other ideas on the subject, or has encountered this issue themselves.
Thanks for your help, especially to DrSuperEvil.
Edit: I forgot to specify that I can only confirm this issue with Terran Barracks. I have not tested it with any other race or type of building.
Hey all. Here's the problem: I have a barracks with 2 attached turrets using the auto-turret model. They attach, fire, and damage correctly. I was following Prozaicmuze's tutorial here to get it functioning. So far, all is well.
The issue I have now is that if the barracks in question is pre-placed, then the turrets rotate freely when idle, and faces to fire when engaged, all as it should. But, if the barracks is built, or if something upgrades to the barracks, the turrets won't rotate. They will still fire and damage appropriately, but they won't rotate when idle or face their targets when firing. I only found one other thread about this, here, and unfortunately for me, my turret actor events are correct.
I have run out of troubleshooting ideas. Has anyone else run into this issue? Have I missed some blatantly obvious option? Any help would be awesome!
Thanks.
Edit: Youtube video demonstrating the issue here: I apologize for the length (4 min), but it was an attempt to capture several instances of the behavior.
You put your turrets in the right slot in the unit?
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
@DrSuperEvil: Go
I have 2 weapons listed in the Barracks unit -
Weapon - North Side Turret Weapon, Turret - North Side Turret Weapon - South Side Turret Weapon, Turret - South Side Turret
I am really confused that they work when pre-placed, but not when constructed.
edit: Gonna lose my internet for a few hours here, but I will follow up later.
Im refering to the Combat - Turrets and Combat - Weapons - Turret fields
Also you sure you got an even to create the turret actor when construction is finished?
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
@DrSuperEvil: Go
No, there was no turrets in the combat - turrets section. Only the combat - weapons section. However, after trying to add the turrets into the combat - turrets entry on the unit, there was no change.
And I do have the turret.enable > create event in a turret actor, one for each turret. I also have the turret objects themselves assigned to use the correct actors respectively.
I've messed around with numerous fields quite a bit with no luck. Also, I've discovered even stranger behaviors with the turrets. I've attached a video to the OP to better illustrate, but to describe it briefly, now the turrets work SOMETIMES when upgrading from another lower tier barracks. I've tested it 3 more times in addition to the 3 in the video, and it seems that 2 out of 3 times they work on upgrade. They never work on building the unit from scratch. So strange....
Edit: Also, with further research, I've found that if the turrets are created using the unit.creation event instead of the unit.birth event, they will turn correctly when the unit is built from the command menu. However, they will be floating above the unit during it's construction (which I can work around by setting opacity), however, they do NOT work when upgrading from the lower tier barracks.
Try throwing in an Ability Morph.*.Finish>Create event?
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
@DrSuperEvil: Go
That event already exists. The turrets being created after the upgrade completes is how I know that event is working.
Edit: Perhaps, though, instead of having the AbilMorph.*.finish > Create on the turret actor, would it work if I put the AbilMorph.*.Finish on the barracks actor, and had a target to the turret actor?
Maybe try destroying and recreating the turret actor on upgrade from a lower tier?
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
@DrSuperEvil: Go
The lower tier doesn't have a turret.
Always worth a try.
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
@DrSuperEvil: Go
While the changing the events around as mentioned above did also create the turret, it had no effect on the rotation. Excuse me while a nerd-rage on my desk for a moment.....
And on the turret model?
Using the ::Supporter as the target to link to the barracks morph.
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
@DrSuperEvil: Go
What I did was I removed this event from the AdvRaxTurretNorth actor:
and I added this event to the Advanced Barracks actor:
I didn't think I needed to address the supporter in the turret actor at all, using this method. Correct me if I'm wrong.
It occurred to me that the issue could be caused activating multiple turrets at the same time that are attached to the same host. I tested this by doing the following:
I removed both the create event listed above from the AdvRaxTurretNorth actor (that creates it at morph finish), and the UnitBirth.AdvancedBarracks create event (again from the AdvRaxTurretNorth actor, the actor for the turret itself). Basically I removed any and all creation events from the North Turret actor, while allowing the South Turret actor to create itself as it always has.
Instead, I added these events to the AdvancedBarracks actor:
The result of this was the creation of the north turret was delayed by 5 seconds. The south turret was created by the same events as before. The south turret still rotated on the pre-placed model, and did not rotate on the upgraded model or the built model. The north turret did not rotate on any of these models.
Breaking it further, however, has helped me understand what is not going wrong at least....
So you know how to fix it?
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
@DrSuperEvil: Go
No. I just know how to break it more at this point.
So, after further troubleshooting, I've become convinced this is an issue with turret object not activating properly when the turret is created. I suspect error is caused because the turret in question is an attachment actor type, and not a unit actor type. I'm not 100% on this, but I suspect as well that when the modelAddition actor is created, the turret object doesn't always see it's creation (due to hierarchical issues), and therefore doesn't enable itself.
I think this might be a bug.
To bypass this, I have tried to use triggers to add the weapons onto the unit after it's creation, with no luck. I've also looking into using triggers to send the turret object a message when the unit is created, but there is currently no way to address a turret object through triggers (that I could find, anyway).
I have no other ideas for working around this issue. I will be reporting it to blizzard as a potential bug.
I am still interested in hearing from anyone who has any other ideas on the subject, or has encountered this issue themselves.
Thanks for your help, especially to DrSuperEvil.
Edit: I forgot to specify that I can only confirm this issue with Terran Barracks. I have not tested it with any other race or type of building.