So as the title implies, I suck with actors once again, nothing new there. The ability I gave said tank is working fine, I'm just not sure how to get the turret turning and firing to properly correspond with the ability.
Basically ability goes something like this, autocast, persistent with 16 random offsets, it launches missile towards that, etc etc. Basically what I want to happen is, when the persistent picks a random offset, the tank spins its turret and fires. I can probably crap something together to make the tank appear to fire, but I really have no clue what to do about this turret spinning business, I stared at the tank actor quite awhile and just do not get it. Am referring to the regular mode tank by the way, not the sieged one, if that even matters.
does it work if you enable the channeled and channeling flag of the persistant effect and test it as weapon, not as ability. just for testing purposes.
Wasn't able to find channeled or channeling flag, but the turret was certainly spinning when I gave it the ability in weapon form. Granted, it was always pointing the wrong way.
maybe you miss the "advanced" fields of the editor. turn them on to see the effect attributes of the persistant effect. i didn't understand you, did it work as you wish or not?
Didn't work as I wanted. The turret did turn wherever he was aiming his weapon, but that isn't what I want at all. I want to figure out how to spin the turret to aim wherever the persistent offset ends up being, but have no idea how to even get started on making that happen. I did add 'siege tank' turret when I added the weapon, but I don't think that will work for this without some really messy workaround. Trying to make the turret turn towards wherever the random offset decides to go, as that is how I want the unit to function.
And yes, Advanced stuff is all turned on, I don't think that is the problem here, I just can't get the turret to do anything other than be attached to a weapon.
Still no luck with this, not even sure where to start honestly on making this turret spin. I'm open to trigger, data, or hybrid solutions for this. There are only 16 possible ways this turret should turn by the way if that helps at all, it just can't do it based on a weapon attack since the firing is meant to be random.
Turrets will only aim at weapon targets, simply as that. If you want to make a turret aim at your random offsets, create invisible dummy units at those points and order the tank to attack those. Remember to destroy them after the attack so they won't swarm your map.
you could set the idle animation to spin. Then it would always be spinning. When it picked a point to target it would rotate to target that point and then go back to spinning again. probly wouldn't be too noticeable and I think gives the desired effect with very minimal overhead/work.
EDIT: and I forgot-you might also want to use an array/random for the target point so the code stays clean if you're not already
Thanks to all for the suggestions on this, I ended up going with Soulfilcher's suggestion on dummy units. Not ideal in any way, but it does do what I want. One follow up question if anyone knows this one, how do I refer to a unit created by a create unit effect in an effect chain? I ended up having to do a spawn apply behavior effect that issued the order attack on the just created unit, but would love to know how to refer to that specifically.
Thanks again, may have something ready in time for the next NA map night at this rate.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
So as the title implies, I suck with actors once again, nothing new there. The ability I gave said tank is working fine, I'm just not sure how to get the turret turning and firing to properly correspond with the ability.
Basically ability goes something like this, autocast, persistent with 16 random offsets, it launches missile towards that, etc etc. Basically what I want to happen is, when the persistent picks a random offset, the tank spins its turret and fires. I can probably crap something together to make the tank appear to fire, but I really have no clue what to do about this turret spinning business, I stared at the tank actor quite awhile and just do not get it. Am referring to the regular mode tank by the way, not the sieged one, if that even matters.
@Deadzergling: Go
does it work if you enable the channeled and channeling flag of the persistant effect and test it as weapon, not as ability. just for testing purposes.
@FunkyUserName: Go
Wasn't able to find channeled or channeling flag, but the turret was certainly spinning when I gave it the ability in weapon form. Granted, it was always pointing the wrong way.
maybe you miss the "advanced" fields of the editor. turn them on to see the effect attributes of the persistant effect. i didn't understand you, did it work as you wish or not?
@FunkyUserName: Go
Didn't work as I wanted. The turret did turn wherever he was aiming his weapon, but that isn't what I want at all. I want to figure out how to spin the turret to aim wherever the persistent offset ends up being, but have no idea how to even get started on making that happen. I did add 'siege tank' turret when I added the weapon, but I don't think that will work for this without some really messy workaround. Trying to make the turret turn towards wherever the random offset decides to go, as that is how I want the unit to function.
And yes, Advanced stuff is all turned on, I don't think that is the problem here, I just can't get the turret to do anything other than be attached to a weapon.
Bump:
Still no luck with this, not even sure where to start honestly on making this turret spin. I'm open to trigger, data, or hybrid solutions for this. There are only 16 possible ways this turret should turn by the way if that helps at all, it just can't do it based on a weapon attack since the firing is meant to be random.
Turrets will only aim at weapon targets, simply as that. If you want to make a turret aim at your random offsets, create invisible dummy units at those points and order the tank to attack those. Remember to destroy them after the attack so they won't swarm your map.
you could set the idle animation to spin. Then it would always be spinning. When it picked a point to target it would rotate to target that point and then go back to spinning again. probly wouldn't be too noticeable and I think gives the desired effect with very minimal overhead/work.
EDIT: and I forgot-you might also want to use an array/random for the target point so the code stays clean if you're not already
Could always use a method like my turret simulation demo map in the worst case.
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 to all for the suggestions on this, I ended up going with Soulfilcher's suggestion on dummy units. Not ideal in any way, but it does do what I want. One follow up question if anyone knows this one, how do I refer to a unit created by a create unit effect in an effect chain? I ended up having to do a spawn apply behavior effect that issued the order attack on the just created unit, but would love to know how to refer to that specifically.
Thanks again, may have something ready in time for the next NA map night at this rate.