It is for an underground base that has a ceiling (one that I made flying units to retain their height everywhere with setting them to height of region on the surface even though the underground area is cliff -1 -2 down, otherwise air units would sink down). I know how to detect regions but not how the ground and air type of units can ignore each other.
I want to make air units not being able to shoot ground units in this area and vise-versa. I can use a trigger to add the buff and remove if in the region or not. Solved
This is easy actually - to attack invulnerable it requires modifying the Weapon to Allow Invul. At best - create duplicate weapon of it and set it to Allow Invul. If it has ground attack, disable the ground and structure attack, Ground (Excluded) Structure (Excluded). Then using triggers based on where the unit is located in region:
Unit - Add 1 Invulnerable (this is a behavior) to Viking (Fighter Mode) [31.13, 32.22] from (Unit(Any Unit))
(because you will see the life - otherwise it is hidden with set Unit State or Make Unit Invul actions)
This is to make the unit invulnerable or vuln based on location. Then use triggers to add/remove Weapon (switching from the original weapon that doesn't allow Invulnerable to the duplicate that disallows shooting ground and allows invulnerable and requires air only)
Enters the region:
General - If (Viking (Fighter Mode))
Actions
Unit - Add 1 Invulnerable to (Triggering unit) from (Unit(Any Unit))
Unit - Remove Viking - Lanzer Torpedoes from (Triggering unit)
Unit - Add Viking - Lanzer Torpedoes Above Facility to (Triggering unit) using turret No Game Link
General - If (Wraith)
Actions
Unit - Add 1 Invulnerable to (Triggering unit) from (Unit(Any Unit))
Unit - Remove Wraith - Burst Lasers from (Triggering unit)
Unit - Remove Wraith - Gemini Missiles from (Triggering unit)
Unit - Add Wraith - Gemini Missiles Above Facility to (Triggering unit) using turret No Game Link
Leaves:
General - If (Viking (Fighter Mode))
Actions
Unit - Remove 1 Invulnerable from (Triggering unit)
Unit - Remove Viking - Lanzer Torpedoes Above Facility from (Triggering unit)
Unit - Add Viking - Lanzer Torpedoes to (Triggering unit) using turret No Game Link
General - If (Wraith)
Actions
Unit - Remove 1 Invulnerable from (Triggering unit)
Unit - Remove Wraith - Gemini Missiles Above Facility from (Triggering unit)
Unit - Add Wraith - Burst Lasers to (Triggering unit) using turret No Game Link
Unit - Add Wraith - Gemini Missiles Above Facility to (Triggering unit) using turret No Game Link
Just change the weapon parameters so ground can only target ground and air can only target air. This is more feasible the fewer weapons you have though
It is for an underground base that has a ceiling (one that I made flying units to retain their height everywhere with setting them to height of region on the surface even though the underground area is cliff -1 -2 down, otherwise air units would sink down). I know how to detect regions but not how the ground and air type of units can ignore each other.
I want to make air units not being able to shoot ground units in this area and vise-versa. I can use a trigger to add the buff and remove if in the region or not. Solved
This is easy actually - to attack invulnerable it requires modifying the Weapon to Allow Invul. At best - create duplicate weapon of it and set it to Allow Invul. If it has ground attack, disable the ground and structure attack, Ground (Excluded) Structure (Excluded). Then using triggers based on where the unit is located in region:
Unit - Add 1 Invulnerable (this is a behavior) to Viking (Fighter Mode) [31.13, 32.22] from (Unit(Any Unit))
(because you will see the life - otherwise it is hidden with set Unit State or Make Unit Invul actions)
This is to make the unit invulnerable or vuln based on location. Then use triggers to add/remove Weapon (switching from the original weapon that doesn't allow Invulnerable to the duplicate that disallows shooting ground and allows invulnerable and requires air only)
Enters the region:
General - If (Viking (Fighter Mode))
Actions
Unit - Add 1 Invulnerable to (Triggering unit) from (Unit(Any Unit))
Unit - Remove Viking - Lanzer Torpedoes from (Triggering unit)
Unit - Add Viking - Lanzer Torpedoes Above Facility to (Triggering unit) using turret No Game Link
General - If (Wraith)
Actions
Unit - Add 1 Invulnerable to (Triggering unit) from (Unit(Any Unit))
Unit - Remove Wraith - Burst Lasers from (Triggering unit)
Unit - Remove Wraith - Gemini Missiles from (Triggering unit)
Unit - Add Wraith - Gemini Missiles Above Facility to (Triggering unit) using turret No Game Link
Leaves:
General - If (Viking (Fighter Mode))
Actions
Unit - Remove 1 Invulnerable from (Triggering unit)
Unit - Remove Viking - Lanzer Torpedoes Above Facility from (Triggering unit)
Unit - Add Viking - Lanzer Torpedoes to (Triggering unit) using turret No Game Link
General - If (Wraith)
Actions
Unit - Remove 1 Invulnerable from (Triggering unit)
Unit - Remove Wraith - Gemini Missiles Above Facility from (Triggering unit)
Unit - Add Wraith - Burst Lasers to (Triggering unit) using turret No Game Link
Unit - Add Wraith - Gemini Missiles Above Facility to (Triggering unit) using turret No Game Link
This sounds like a cool first person if you where in the Viking flying in the city havering to go around buildings.
@ImpctR: Go
Just change the weapon parameters so ground can only target ground and air can only target air. This is more feasible the fewer weapons you have though
<Click Here> To See My Epic Single Player Campaign (LifeForceCampaign.com)