I have a tower that is a marine. It occupies a 1x1 square.
If I have a simple 1x1 pathing footprint, the enemy units run around the towers but the marine doesn't look at it's target while firing.
If I remove the pathing footprint, the tower looks at it's target while firing but the enemy units just crash into the wall of marines rather than going around them like they should be.
Can someone either tell me what I'm doing wrong or explain the footprint editor well enough that I can figure it out? Thanks.
EDIT::: OK, I'm retarded.. I need to somehow set up the marine as a turret.. I don't know how to do that either.
Units with pathing footprints cannot turn. Your best bet is to use units with rotating guns (Missile Turret, Goliath, Immortal, Photon Cannon, Siege Tank, Mercenary Siege Tank, A.R.E.S, Planetary Fortress, Crawler / Spore, etc). The Archon turns its arms when it attacks. There are probably more.
You can also use triggers. If you have an event "Unit Attacks", you can use an action to make the attacking unit face the unit it's attacking. This works for buildings and does not affect the pathing.
It looks weird if you turn it instantly, especially because the towers will not revert back to their original position. You can use math and science to interpolate its intermediate facing angles and turn it over time to give the illusion of blending. Or there might be an option to blend the turn in the triggers, I'm not sure.
You should make sure to revert the tower back to its original facing angle when it is done attacking. And make sure not to rotate towers that have guns that rotate on their own.
I'm not sure if you understood my post. There is no way you can make the Marine turn if it has a pathing footprint without using triggers. The only units that can turn while retaining their pathing footprint are ones with body parts capable of facing their targets independently via turret objects (such as the units I listed in my previous post).
If you need the Marine to turn, you'll need to use a method similar to what I described in the post above. Adding a turret to a unit whose model does not have a uniquely rotate-able part will not cause it to rotate. It will, however, allow it to attack units even if the tower is not turning graphically, because the turret object will still "logically" turn to face the target when the weapon is used.
Could you place the marine without the pathing footprint, and then use data or a trigger to spawn something else in the same space that DOES have a pathing footprint?
ie:
Unit is Created
Unit type of Unit is Marine
Create 1 (Rock) at position of (Last Created Unit) and (Ignore Placement)
That is possible, and a solution I used to make hero towers in WC3. However, it gets more complicated when you want to sell towers, or if a tower gets destroyed. You have to make sure to link the two objects together so you can always access one from the other.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I have a tower that is a marine. It occupies a 1x1 square.
If I have a simple 1x1 pathing footprint, the enemy units run around the towers but the marine doesn't look at it's target while firing.
If I remove the pathing footprint, the tower looks at it's target while firing but the enemy units just crash into the wall of marines rather than going around them like they should be.
Can someone either tell me what I'm doing wrong or explain the footprint editor well enough that I can figure it out? Thanks.
EDIT::: OK, I'm retarded.. I need to somehow set up the marine as a turret.. I don't know how to do that either.
@Shawn91210: Go
Units with pathing footprints cannot turn. Your best bet is to use units with rotating guns (Missile Turret, Goliath, Immortal, Photon Cannon, Siege Tank, Mercenary Siege Tank, A.R.E.S, Planetary Fortress, Crawler / Spore, etc). The Archon turns its arms when it attacks. There are probably more.
You can also use triggers. If you have an event "Unit Attacks", you can use an action to make the attacking unit face the unit it's attacking. This works for buildings and does not affect the pathing.
It looks weird if you turn it instantly, especially because the towers will not revert back to their original position. You can use math and science to interpolate its intermediate facing angles and turn it over time to give the illusion of blending. Or there might be an option to blend the turn in the triggers, I'm not sure.
You should make sure to revert the tower back to its original facing angle when it is done attacking. And make sure not to rotate towers that have guns that rotate on their own.
@Vexal: Go
Thanks Vexal. I'll see what I can come up with.
@Shawn91210: Go
I'm not sure if you understood my post. There is no way you can make the Marine turn if it has a pathing footprint without using triggers. The only units that can turn while retaining their pathing footprint are ones with body parts capable of facing their targets independently via turret objects (such as the units I listed in my previous post).
If you need the Marine to turn, you'll need to use a method similar to what I described in the post above. Adding a turret to a unit whose model does not have a uniquely rotate-able part will not cause it to rotate. It will, however, allow it to attack units even if the tower is not turning graphically, because the turret object will still "logically" turn to face the target when the weapon is used.
Could you place the marine without the pathing footprint, and then use data or a trigger to spawn something else in the same space that DOES have a pathing footprint?
ie:
@Chiquihuite: Go
That is possible, and a solution I used to make hero towers in WC3. However, it gets more complicated when you want to sell towers, or if a tower gets destroyed. You have to make sure to link the two objects together so you can always access one from the other.