[recruit] at specific locations

The place to post your WML questions and answers.

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.
Post Reply
absinthia
Posts: 10
Joined: June 3rd, 2021, 7:03 am

[recruit] at specific locations

Post by absinthia »

In a cave map in the editor i made it so that parts of the impassable walls have a castle overlay in order to reate the effect that random castle tiles in the cave are connected with the ai leader in the keep. But now the ai keeps recruiting units inside the impassable walls. Now i was wondering if theres a way inside the [recruit] tag in the scenario.cfg to specificy which castle tiles are used for recruiting? Or if theres a workaround to create the same effect...
User avatar
Lord-Knightmare
Discord Moderator
Posts: 2340
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: [recruit] at specific locations

Post by Lord-Knightmare »

The [recruit] tag is specific to ReplayWML. In a scenario file this will do nothing, or may cause error.
Can you elaborate problem a bit visually? Show a map screenshot with what you intend to do? It may help clarify on what exactly you may want to do.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
absinthia
Posts: 10
Joined: June 3rd, 2021, 7:03 am

Re: [recruit] at specific locations

Post by absinthia »

Screenshot_000.png
the leader spawns at the keep tile at 26,22, and through the castle overlays in the walls&chasms i connect the castle-tiles at coordinates 13,20 14,19 19,18 20,17 27,18 29,21 29,22 24,20 24,21 25,21 with it. the units it recruits should only be recruited at those specific castle-tiles and not in the walls(impassable)&chasms(unwalkable) with the castle overlay...
User avatar
Lord-Knightmare
Discord Moderator
Posts: 2340
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: [recruit] at specific locations

Post by Lord-Knightmare »

absinthia wrote: June 5th, 2021, 11:16 am Screenshot_000.png

the leader spawns at the keep tile at 26,22, and through the castle overlays in the walls&chasms i connect the castle-tiles at coordinates 13,20 14,19 19,18 20,17 27,18 29,21 29,22 24,20 24,21 25,21 with it. the units it recruits should only be recruited at those specific castle-tiles and not in the walls(impassable)&chasms(unwalkable) with the castle overlay...
Ah, I see now. Well, to implement this, you'd have to instantly teleport whatever the leader recruits to the aforementioned castle tiles. However, a trick is using the [tunnel] near his initial keep and connect those to the castle tiles. That way you can make it look like he is recruiting units at those locations. One very easy, but tedious trick to add this is to implement the entire recruitment phase with WML directly.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
User avatar
octalot
General Code Maintainer
Posts: 783
Joined: July 17th, 2010, 7:40 pm
Location: Austria

Re: [recruit] at specific locations

Post by octalot »

One method would be to put statues on those hexes, as in the multiplayer map Thousand Stings Garrison.
absinthia
Posts: 10
Joined: June 3rd, 2021, 7:03 am

Re: [recruit] at specific locations

Post by absinthia »

thnx, got it solved with

[event]
name=start
first_time_only=no
[tunnel]
[filter]
side=2
[/filter]
[source]
x=27,27,27,28,26,26
y=22,23,24,23,23,24
[/source]
[target]
x=9,10,13,14,13,14,13,23,25,27,29,29,33,34
y=25,24,20,19,16,16,17,16,17,18,21,22,23,23
[/target]
[/tunnel]
[/event]
Post Reply