Area attacks?
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.
-
- Posts: 12
- Joined: March 16th, 2010, 12:00 am
Area attacks?
Is there a way to have one unit inflict damage upon several other adjacent units? I want to have a unit have an area attack and inflict damage on all surrounding units. Can someone help me?
- Pentarctagon
- Project Manager
- Posts: 5732
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Area attacks?
you could probably use [store_locations] to store all units within the given area and then use FOREACH to inflict the damage on each unit that was stored.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
Re: Area attacks?
There should be plenty of older threads about that, probably some with working example code too. Not that I could easily find any with a couple of searches, but still.