I am attempting to create an ability that will replicate the weapon of whatever the casting unit is. Obviously, I used a switch effect for the ability. For the Marauder, I switched the actor events for the main unit actor so that the attack animations fire upon this new ability. That works correctly. I then went to the attack actor and did the same, but since other units' attack actors will fire from the same effect, I added a unit type validator to test whether the casting unit is a marauder. I'm sure this works fine too. Finally, I added a case to the ability's effect that used this validator to launch the Punisher Grenade. This is where things are messing up. The grenade will only launch from one side. I noticed that there is some sort of "method", as the attack actor calls it, that determines the launch attachment point. What do I need to change here so that the grenade launches correctly?
UPDATE: I backed up so the Marauder was like it originally was, since the Launch Missile effect is called by both the weapon, and the universal switch effect. So now the only change is the effect chain started by Launch Missile deals no damage. Still, the missile will not launch depending on which animation is playing. I have come to the conclusion that the Punisher Grenades weapon has something to do with it. But what!?!?
Try looking at the actor events for the marauder you see they use status set alot. Or read the >4 other forum threads on the same topic of getting something to shoot out or a marauder.
Effect. PunisherGrenadesLM.Start
At Caster
IsStatus WeaponNext 2
StatusSet WeaponNext 0
Effect.PunisherGrenadesLM.Start
At Caster
StatusIncrement WeaponNext
This still fires since Punisher GrenadesLM is still fired by my switch effect. So if this is what determines the attach point, then something is broke...
Edit: Here's what's going on. The weapon calls Launch Missile, which used to call the set effect upon impact. I took that out. My switch effect only calls the launch missile if the caster is a marauder. So both the weapon and my switch effect call the same launch missile effect. Still, the missile will launch correctly if the unit attacks, but not so if the unit uses my ability (firing the switch and in turn the launch missile effect.) I didn't change a thing about the actors since they all fire once the launch missile effect starts.
I am attempting to create an ability that will replicate the weapon of whatever the casting unit is. Obviously, I used a switch effect for the ability. For the Marauder, I switched the actor events for the main unit actor so that the attack animations fire upon this new ability. That works correctly. I then went to the attack actor and did the same, but since other units' attack actors will fire from the same effect, I added a unit type validator to test whether the casting unit is a marauder. I'm sure this works fine too. Finally, I added a case to the ability's effect that used this validator to launch the Punisher Grenade. This is where things are messing up. The grenade will only launch from one side. I noticed that there is some sort of "method", as the attack actor calls it, that determines the launch attachment point. What do I need to change here so that the grenade launches correctly?
UPDATE: I backed up so the Marauder was like it originally was, since the Launch Missile effect is called by both the weapon, and the universal switch effect. So now the only change is the effect chain started by Launch Missile deals no damage. Still, the missile will not launch depending on which animation is playing. I have come to the conclusion that the Punisher Grenades weapon has something to do with it. But what!?!?
Try looking at the actor events for the marauder you see they use status set alot. Or read the >4 other forum threads on the same topic of getting something to shoot out or a marauder.
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:
I know the Marauder actor uses Status set:
Effect. PunisherGrenadesLM.Start
At Caster
IsStatus WeaponNext 2
StatusSet WeaponNext 0
Effect.PunisherGrenadesLM.Start
At Caster
StatusIncrement WeaponNext
This still fires since Punisher GrenadesLM is still fired by my switch effect. So if this is what determines the attach point, then something is broke...
Edit: Here's what's going on. The weapon calls Launch Missile, which used to call the set effect upon impact. I took that out. My switch effect only calls the launch missile if the caster is a marauder. So both the weapon and my switch effect call the same launch missile effect. Still, the missile will launch correctly if the unit attacks, but not so if the unit uses my ability (firing the switch and in turn the launch missile effect.) I didn't change a thing about the actors since they all fire once the launch missile effect starts.