Hello, in my TD I am using some units as towers. What exactly controls whether or not the unit faces the enemy while shooting? I turned their movement off so they don't scatter away and set the footprint pathing to 2x2 so everything seems to be working fine except that the unit doesn't face the enemy. Any help is appreciated, thanks.
In the Weapon object that the unit is using, there is a field called "Stats - Arc".
If you want the unit to face directly at the unit its firing on, change that field to 0, otherwise, give it a value and the firing unit will need to be at the specified angle before it can attack.
You will also need to make sure the firing unit has a Movement - Turning Rate (a field in the Unit object) that is > 0, so that it can actually turn to face the target.
Thats pretty much all you need to get a unit to face another unit while firing. Pretty simple really.
Okay my arc is already 0, so I guess I'm just missing the turning rate thing. I don't seem to have a Unit Object - I'm using the Immortal unit and it doesn't have any Unit objects. Should I just attach some random Unit to this tower?
You can't have a unit in the game without a unit object.
When I say "unit object" I'm talking about the thing that shows up in the "Units" tab of the Data editor. The "unit object" is the same thing that you add the weapon for the unit to.
That being said, if you already have the Arc set to 0 and the turning rate set to something reasonable, then the unit should be turning to face the enemy unless you have a separate actor attaching itself to the unit to hold the unit's rotation in place (there are many actors that can do this and override the unit's natural turning mechanics, I won't go through them all here since it would be pointless).
I do hope you didn't just "duplicate" the immortal unit before using it as towers. Man I wish I could find the idiot who told everyone to just Duplicate units when making new ones. So much sh!t breaks when you apply Duplicate on the unit level of the tree.
Thanks. I just duplicated the actors, weapon, and effects. I dunno. What is the best method to copy a base unit to use as something else?
Anyways, the actors I have are: Centurion and Centurion Attack [renamed from Immortal Copy and Immortal Attack Copy]. I guess I'll check through those to see if something's overriding the turning - though I have no idea what I'm looking for lol.
Oh yeh and turning rate is grayed out so I'm not sure if that is the problem. I tried changing different movement properties but couldn't get it to not be grayed.
I had a little bit of difficulty here myself, but I figured it out for my map.
For my map, I'm using Spine Crawlers and Photon Cannons as my "Tower" units, currently. When I first made them, they would not face their target when they attacked. (With my towers only having a Unit object, an Actor (Unit) object, an Actor (Damage) object, and an Actor (Launch Missile) object)
By creating a Turret object for your Tower and including it in the Unit (Weapons - Turret) field and creating an Actor (Turret) object, you can allow your Towers to turn and face their targets when they attack them.
I'm not sure if this will work for units that don't normally have a turret associated with them, but it should work for all units that do.
Thanks guys, I got it!!!!! I saw that the original Immortal unit had a turret object when I searched for "Immortal" under actors. I didn't see this in its Unit Object, but only when I searched. I added the event "Turret Enable: Centurion - Create" and it works!!! Feels good to be a gangster, thanks for your help guys - my next question will be arriving in t-minus 2 minutes.
How exactly did you add "the event "Turret Enable: Centurion - Create"".
I'm a beginner of doom! And I have the same problem that you had. I can't get the "towers" to face the mobs.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hello, in my TD I am using some units as towers. What exactly controls whether or not the unit faces the enemy while shooting? I turned their movement off so they don't scatter away and set the footprint pathing to 2x2 so everything seems to be working fine except that the unit doesn't face the enemy. Any help is appreciated, thanks.
@rymonator: Go
In the Weapon object that the unit is using, there is a field called "Stats - Arc".
If you want the unit to face directly at the unit its firing on, change that field to 0, otherwise, give it a value and the firing unit will need to be at the specified angle before it can attack. You will also need to make sure the firing unit has a Movement - Turning Rate (a field in the Unit object) that is > 0, so that it can actually turn to face the target.
Thats pretty much all you need to get a unit to face another unit while firing. Pretty simple really.
Next.
@zzPop: Go
Okay I actually do have a turning rate > 0, but it's grayed out, so that's probably the issue. Any idea what controls this? Thanks.
You can't have a unit in the game without a unit object.
When I say "unit object" I'm talking about the thing that shows up in the "Units" tab of the Data editor. The "unit object" is the same thing that you add the weapon for the unit to.
That being said, if you already have the Arc set to 0 and the turning rate set to something reasonable, then the unit should be turning to face the enemy unless you have a separate actor attaching itself to the unit to hold the unit's rotation in place (there are many actors that can do this and override the unit's natural turning mechanics, I won't go through them all here since it would be pointless).
I do hope you didn't just "duplicate" the immortal unit before using it as towers. Man I wish I could find the idiot who told everyone to just Duplicate units when making new ones. So much sh!t breaks when you apply Duplicate on the unit level of the tree.
@zzPop: Go
Thanks. I just duplicated the actors, weapon, and effects. I dunno. What is the best method to copy a base unit to use as something else?
Anyways, the actors I have are: Centurion and Centurion Attack [renamed from Immortal Copy and Immortal Attack Copy]. I guess I'll check through those to see if something's overriding the turning - though I have no idea what I'm looking for lol.
Oh yeh and turning rate is grayed out so I'm not sure if that is the problem. I tried changing different movement properties but couldn't get it to not be grayed.
@rymonator: Go
I had a little bit of difficulty here myself, but I figured it out for my map.
For my map, I'm using Spine Crawlers and Photon Cannons as my "Tower" units, currently. When I first made them, they would not face their target when they attacked. (With my towers only having a Unit object, an Actor (Unit) object, an Actor (Damage) object, and an Actor (Launch Missile) object)
By creating a Turret object for your Tower and including it in the Unit (Weapons - Turret) field and creating an Actor (Turret) object, you can allow your Towers to turn and face their targets when they attack them.
I'm not sure if this will work for units that don't normally have a turret associated with them, but it should work for all units that do.
Thanks guys, I got it!!!!! I saw that the original Immortal unit had a turret object when I searched for "Immortal" under actors. I didn't see this in its Unit Object, but only when I searched. I added the event "Turret Enable: Centurion - Create" and it works!!! Feels good to be a gangster, thanks for your help guys - my next question will be arriving in t-minus 2 minutes.
@rymonator: Go
How exactly did you add "the event "Turret Enable: Centurion - Create"". I'm a beginner of doom! And I have the same problem that you had. I can't get the "towers" to face the mobs.