AI Leader Won't Recruit
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: 9
- Joined: November 6th, 2020, 4:45 am
AI Leader Won't Recruit
Hi all,
Can't tell if it's something to do with my map, or with my scenario code, but the ai leader in my scenario refuses flat-out to recruit.
I have the following code for recruiting:
The .map in question is also attached, in case maybe i've messed something up there? The spot noted for 'Player 2' has the AI leader, and he will not recruit at all...
Can't tell if it's something to do with my map, or with my scenario code, but the ai leader in my scenario refuses flat-out to recruit.
I have the following code for recruiting:
Code: Select all
[side]
controller="ai"
income=2
side=2
team_name=2
user_team_name=_"Vuenguar"
[unit]
canrecruit=yes
id=Ghajaan
name= _ "Ghajaan"
type="Dune Spearmaster"
unrenamable=yes
profile=portraits/humans/javelineer.png
x=42
y=3
{GOLD 200 250 300}
#ifdef EASY
recruit=Dune Rover, Dune Soldier, Dune Rider, Dune Rider, Dune Piercer, Dune Burner, Dune Herbalist
#endif
#ifdef NORMAL
recruit=Dune Rider, Dune Rider, Dune Piercer, Dune Piercer, Dune Burner, Dune Herbalist
#endif
#ifdef HARD
recruit=Dune Rider, Dune Piercer, Dune Raider, Dune Sunderer, Dune Soldier, Dune Rover, Dune Herbalist
#endif
[/unit]
[/side]
- Pentarctagon
- Project Manager
- Posts: 5566
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: AI Leader Won't Recruit
You'll want
recruit
to be part of [side] rather than [unit]. [unit] would be extra_recruit
.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: AI Leader Won't Recruit
Are you sure your difficulty modes are "EASY", "NORMAL" and "HARD" and not something else?
Do you need quotes around
That's all the guesses I got.
Do you need quotes around
ai
. I don't recall ever seeing anybody use quotes there. That's all the guesses I got.
Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
- lhybrideur
- Posts: 369
- Joined: July 9th, 2019, 1:46 pm
Re: AI Leader Won't Recruit
I think Pentarctagon solution is what is wrong with your code
Re: AI Leader Won't Recruit
Pentarctagon likely identified the bug.
I wonder if changing
I wonder if changing
[unit]
to [leader]
would fix it. Just curious.Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
-
- Posts: 9
- Joined: November 6th, 2020, 4:45 am
Re: AI Leader Won't Recruit
Thanks! That's done the trick. <3Pentarctagon wrote: ↑November 18th, 2020, 5:42 am You'll wantrecruit
to be part of [side] rather than [unit]. [unit] would beextra_recruit
.