Title says it all. I'm looking for a way to make friendly units block projectiles, independent of friendly fire enabled or not. I'm sure I had seen collision classes declared in the unit and projectile properties at some time of the development, but it appears as if they are gone. Only property left appears to be "splash_damages_allies", but that's certainly not the desired effect.
Currently: Nothing. Entities are declared {"ammo_type":"AMMO_*"} which is about everything useful visible. And then somehow all enemy units with physics properties (namely: collision box) can consume collision events with ammo and thereby trigger the damage effects. It appears as if friendly fire can't be expressed with the json files currently. And neither have I found any clue how targeting actually works, e.g. how to tell units to test for free line of sight before shooting. It occurs as if they would only automatically consider the terrain for this decision, but nothing else.
what do walls do to detect? Do they just be in the right place at the right time? Is it simply they take up the space projectiles fly thru?
Code: "collision_layers":"WL_AnyHorizontalGroundOrWaterSurface" There it is. Anyone willing to test what happens when unit base classes get "collision_layers":"WL_AnyHorizontalGroundOrWaterSurface" assigned to their physics property? In theory, that should make them block shots. Can't test it myself unfortunately since my GPU is broken and PA just won't run on Intel IGP. EDIT: I'm not sure yet why walls do block projectiles at all. Projectiles are spawned in WL_Air, however walls and other structures are only in WL_AnyHorizontalGroundOrWaterSurface. And there is also that odd WL_AnySurface group which however is only used in the guard_layer property. And yet another property I don't understand yet: "ignore_collisions":false Does this only prevent the engine from using relax mechanics when pushing units into it, or does it enable collisions with friendly entities? We should really start documenting that stuff...