Zone of Control
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Zone of Control
Anyone know how to increase zones of control. For example if I wanted an unit to have a radius 2 zone of control how would I go about doing it.
- Lord-Knightmare
- Discord Moderator
- Posts: 2365
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: Zone of Control
Dont think it's possible
Code: Select all
zoc: if "yes" the unit will have a zone of control regardless of level. If present but set to anything other than "yes," the unit will have no zone of control. If the tag is omitted, zone of control is dictated by unit level (level 0 = no zoc, level 1+ = has zoc).
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Re: Zone of Control
With events everything is possible
- beetlenaut
- Developer
- Posts: 2827
- Joined: December 8th, 2007, 3:21 am
- Location: Washington State
- Contact:
Re: Zone of Control
There is more than one way, but this is how I would do it. I would put an enter_hex event in this unit's [unit_type] tag. This is what the event would do:
- store_locations that are two hexes away from enemy units of this type
- use find_in to see if the moving unit has entered one of those hexes
- if yes, set the moving unit's movement points to zero
- [allow_undo][/allow_undo] (Don't forget this or undo will always be blocked if one of these units is on the screen.)
Hopefully, that answers the question.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide