I'm working on a Phase Shift ability that can be cast on units and structures, and it makes the target unit/structure able to pass through other units/structures. Its easy to disable collision for units, but how can I make it work for structures? Is it possible without massive changes to all footprints? Right now the ability is near-useless because units can't walk through structures.
EDIT: Ok, so I made a few test and I can shift from pathing footprint system to radius system for all strcutures and it works for what I want. But what consequences can I expect to have? Will pathing be affected?
EDIT 2: I predict issues with addons if I just remove footprints. So right now I'm limiting the ability so it can't target structures that train units, so it won't be unbalanced for different races.
I get the feeling I may not get any help, so I'm going to try it anyway, because it looks like this ability can change melee matches in so many ways. I'll post my results here in case someone else tries something similar.
I have one problem right now, different structures with the same footprint can have different radius values. As one example Pylons have 0.5 while Supply Depots have 1.25. I'm not sure it has a real effect in game and I'm not sure I can change everything to the values I need without bad consequences. After some tests I discovered that radius for 3x3 structures must be around 1.55 and for 2x2 it must be around 0.75 so when you try to build something near them you get the right size blocked by these structures. But maybe the radius change affects how units can or can't walk between structures?
@TheAlmaity: Go Yes, many different footprints mean I have to test each structure in game first to check how units behave before I can change it to radius. So far I managed to switch Pylons, Supply Depots and Photon Cannons. They block path just like the footprint would do, but I got an unforeseen problem: I can't place these structures on terrain not visible to me, I get a "cant find location" error message. So, instead of just clicking where I want the worker to build, I have to move and then build.
I'm not going to make units walk through cliffs, I think that would make the ability OP. Right now units can already walk through supply walls so blocking ramps will become less useful against palyers with this ability. It will be a protoss ability so casting it on DTs is far more than I want it to be able to do ;-)
@DrSuperEvil: Go What I've been doing is to disable the pathing footprint, because that's what I need to make it work, and tried to get the same effect using radius, and yes, the buff suppresses collision. But I tested it against the AI and it has terrible, terrible consequences to the pathing system. By just managing my own base I can see how units get totally confused with the modified structures. One allied AI got a probe stuck facing a pylon, when trying to build a gateway just on the other side of it. Frequently units wont be able to walk around a structure, they just move right to it and get stuck, many other smaller bugs also occur.
Sadly I can't keep it this way in a melee map so maybe I'll have to scrap the ability and return everything to footprints.
The most effective but difficult solution would be to make a Morph ability that replaces the phase shifted unit with an equivalent unit using air pathing. The Morph can be triggered by an effect, but it has to be a Morph because only Morph abilities replace a unit while maintaining the unit actor's scope. You can also use triggers to reduce inner radius to 0 on a unit type, but this affects all units of the type and doesn't allow walking through buildings but can potentially get a unit past otherwise blocked areas.
@TrenchaunT: Go No, I don't want units to walk through cliffs or anything like that. To make it clear I'll explain a little more about it:
The ability can be cast on units or structures. When cast on a unit, that unit can move through other units or structures, but is still blocked by terrain and doodads. When cast on a structure all ground units can move through it. So morphing a unit to use air pathing won't solve my problem, specially because I wouldnt be able to cast it on a strcuture and allow ground units to move through it. I could morph the structure to a copy with no footprints, but that would give me the same problem as flying units: I'd have to duplicate all strcutures an create an instant morph ability to all of them and still think about details such as: what if the strcuture is currently training or researching?
To me it looks like to much work in this workaround just to make it happen and still I'd probably face lots of bugs. Damn I just needed to be able to switch or disable footprints using buffs....
There is a way to do it with triggers, but it unfortunately doesn'twork in this type of game. I knowhow to make it work ifcast on itself, but not for others. You would have to have a MoBA/DoTA type game for this to work properly.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I'm working on a Phase Shift ability that can be cast on units and structures, and it makes the target unit/structure able to pass through other units/structures. Its easy to disable collision for units, but how can I make it work for structures? Is it possible without massive changes to all footprints? Right now the ability is near-useless because units can't walk through structures.
EDIT: Ok, so I made a few test and I can shift from pathing footprint system to radius system for all strcutures and it works for what I want. But what consequences can I expect to have? Will pathing be affected?
EDIT 2: I predict issues with addons if I just remove footprints. So right now I'm limiting the ability so it can't target structures that train units, so it won't be unbalanced for different races.
I get the feeling I may not get any help, so I'm going to try it anyway, because it looks like this ability can change melee matches in so many ways. I'll post my results here in case someone else tries something similar.
I have one problem right now, different structures with the same footprint can have different radius values. As one example Pylons have 0.5 while Supply Depots have 1.25. I'm not sure it has a real effect in game and I'm not sure I can change everything to the values I need without bad consequences. After some tests I discovered that radius for 3x3 structures must be around 1.55 and for 2x2 it must be around 0.75 so when you try to build something near them you get the right size blocked by these structures. But maybe the radius change affects how units can or can't walk between structures?
@SoulFilcher: Go
There are many different footprints, very little of them are actually fully square. The barracks footprint has rounded edges I believe.
I wonder... is there any way to give a unit Air pathing? That would sort of be a problem with cliffs then though >.>
@TheAlmaity: Go Yes, many different footprints mean I have to test each structure in game first to check how units behave before I can change it to radius. So far I managed to switch Pylons, Supply Depots and Photon Cannons. They block path just like the footprint would do, but I got an unforeseen problem: I can't place these structures on terrain not visible to me, I get a "cant find location" error message. So, instead of just clicking where I want the worker to build, I have to move and then build.
I'm not going to make units walk through cliffs, I think that would make the ability OP. Right now units can already walk through supply walls so blocking ramps will become less useful against palyers with this ability. It will be a protoss ability so casting it on DTs is far more than I want it to be able to do ;-)
Details of footprints are based on the resolution. There are the placement apply and chaeck fields.
Could always disable the suppress collision flag enabled buff using an enumerate area combined with a location range validator.
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've been doing is to disable the pathing footprint, because that's what I need to make it work, and tried to get the same effect using radius, and yes, the buff suppresses collision. But I tested it against the AI and it has terrible, terrible consequences to the pathing system. By just managing my own base I can see how units get totally confused with the modified structures. One allied AI got a probe stuck facing a pylon, when trying to build a gateway just on the other side of it. Frequently units wont be able to walk around a structure, they just move right to it and get stuck, many other smaller bugs also occur.
Sadly I can't keep it this way in a melee map so maybe I'll have to scrap the ability and return everything to footprints.
@SoulFilcher: Go
The most effective but difficult solution would be to make a Morph ability that replaces the phase shifted unit with an equivalent unit using air pathing. The Morph can be triggered by an effect, but it has to be a Morph because only Morph abilities replace a unit while maintaining the unit actor's scope. You can also use triggers to reduce inner radius to 0 on a unit type, but this affects all units of the type and doesn't allow walking through buildings but can potentially get a unit past otherwise blocked areas.
@TrenchaunT: Go No, I don't want units to walk through cliffs or anything like that. To make it clear I'll explain a little more about it:
The ability can be cast on units or structures. When cast on a unit, that unit can move through other units or structures, but is still blocked by terrain and doodads. When cast on a structure all ground units can move through it. So morphing a unit to use air pathing won't solve my problem, specially because I wouldnt be able to cast it on a strcuture and allow ground units to move through it. I could morph the structure to a copy with no footprints, but that would give me the same problem as flying units: I'd have to duplicate all strcutures an create an instant morph ability to all of them and still think about details such as: what if the strcuture is currently training or researching?
To me it looks like to much work in this workaround just to make it happen and still I'd probably face lots of bugs. Damn I just needed to be able to switch or disable footprints using buffs....
There is a way to do it with triggers, but it unfortunately doesn'twork in this type of game. I knowhow to make it work ifcast on itself, but not for others. You would have to have a MoBA/DoTA type game for this to work properly.