Script Request: No land units in hex

Post new scenarios and mods here to share with other gamers.

Moderator: AlvaroSousa

Post Reply
User avatar
ago1000
Posts: 901
Joined: Fri Aug 06, 2004 7:12 am
Location: Canada

Script Request: No land units in hex

Post by ago1000 »

I was wondering if a script could be added to the editor to check if a land unit exists on the hex. If it already exists, I've missed it somewhere. If it's too difficult I understand that too.

Not sure this will be possible. The idea will be used to garrison ports that are under your control through events with no micro. This would force your opponent to think twice about invading without recon. Just a thought and just wondering.

Thanks in advance.

User avatar
AlvaroSousa
Posts: 12127
Joined: Mon Jul 29, 2013 7:13 pm
Contact:

RE: Script Request: No land units in hex

Post by AlvaroSousa »

landUnitInRadius=x,y,+units,radius,alliance ― returns true if the number of land units in the area is equal to or GREATER than the number from the specified alliance that are within the radius. If set to zero radius it checks the x,y hex only

landUnitInRadius=x,y,-units,radius,alliance ― returns true if the number of land units in the area is LESS than the (absolute value)number of units in the specified alliance that are within the radius. If set to zero radius it checks the x,y hex only

You can also set "units" to "0" so it checks for NO units in the radius
Creator Kraken Studios
- WarPlan
- WarPlan Pacific

Designer Strategic Command
- Brute Force (mod) SC2
- Assault on Communism SC2
- Assault on Democracy SC2
- Map Image Importer SC3
User avatar
ago1000
Posts: 901
Joined: Fri Aug 06, 2004 7:12 am
Location: Canada

RE: Script Request: No land units in hex

Post by ago1000 »

You da man. Thank you, thank you.
Post Reply

Return to “Scenario Design and Modding”