[unit] multiple doesnt work
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.
[unit] multiple doesnt work
im trying to place multiple Ghost1 and Shadow1 inside a event in the scenario.cfg , but it spawns just the first units of both and not the rest, what am i doing wrong?
ps: when i try this macro {NOTRAIT_UNIT 3 (Ghost1) 19 16} , i get a lua error and i tried to make a screenshot but on the shot the lua error doesnt show...
Code: Select all
[unit]
side=3
type=Ghost1
x=3,9,12,11,15,15,20,24,11,22
y=11,11,11,13,22,27,35,38,39,45
[/unit]
[unit]
side=3
type=Shadow1
x,y=5,25 5,31 3,54
[/unit]
{NOTRAIT_UNIT 3 (Ghost1) 19 16}
- Lord-Knightmare
- Discord Moderator
- Posts: 2361
- 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: [unit] multiple doesnt work
Yeah, you cannot do that.absinthia wrote: ↑June 6th, 2021, 10:53 am im trying to place multiple Ghost1 and Shadow1 inside a event in the scenario.cfg , but it spawns just the first units of both and not the rest, what am i doing wrong?ps: when i try this macro {NOTRAIT_UNIT 3 (Ghost1) 19 16} , i get a lua error and i tried to make a screenshot but on the shot the lua error doesnt show...Code: Select all
[unit] side=3 type=Ghost1 x=3,9,12,11,15,15,20,24,11,22 y=11,11,11,13,22,27,35,38,39,45 [/unit] [unit] side=3 type=Shadow1 x,y=5,25 5,31 3,54 [/unit] {NOTRAIT_UNIT 3 (Ghost1) 19 16}
instead do:
Code: Select all
{GENERIC_UNIT 3 "Ghost" 3 9}
{GENERIC_UNIT 3 "Ghost" 3 9}
{GENERIC_UNIT 3 "Ghost" 3 9}
{GENERIC_UNIT 3 "Ghost" 3 9}
{GENERIC_UNIT 3 "Ghost" 3 9}
{GENERIC_UNIT 3 "Ghost" 3 9}
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: [unit] multiple doesnt work
You could use
Hope that makes sense.
[store_locations]
to set the x,y coords then loop over the location variable using [foreach]
and call [unit]
within that.Hope that makes sense.