Movement problem
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.
Movement problem
Hello, I was just wondering how to make a leader's movement temporarily equal 0? No matter what I do the leader always seems to move. (It's the ai's leader).
Take a look at the Era of the Future!
Current factions: The Welkin, The Brungar, and The Nordhris!
^This is old news lol but I don't care^
New news -> Up the River Bork Campaign!
Current factions: The Welkin, The Brungar, and The Nordhris!
^This is old news lol but I don't care^
New news -> Up the River Bork Campaign!
Re: Movement problem
Code: Select all
[event]
name=side 1 turn 1
[store_unit]
[filter]
side=1,2,3#edit if you need
canrecruit=yes
[/filter]
variable=aileaders
[/store_unit]
{FOREACH aileaders i}
[object]
silent=yes
[filter]
id=$aileaders[$i].id
[/filter]
[effect]
apply_to=movement
set=0
[/effect]
[/object]
{NEXT i}
{CLEAR_VARIABLE aileaders}
[/event]
Re: Movement problem
Thank you , that works perfectly. Would anyone now be able to tell me how to keep a leader from recruiting?
Take a look at the Era of the Future!
Current factions: The Welkin, The Brungar, and The Nordhris!
^This is old news lol but I don't care^
New news -> Up the River Bork Campaign!
Current factions: The Welkin, The Brungar, and The Nordhris!
^This is old news lol but I don't care^
New news -> Up the River Bork Campaign!
-
- Posts: 1549
- Joined: June 18th, 2009, 1:45 am
Re: Movement problem
The simplest way would be to give the AI leaders an empty recruit list at the start, and then using [modify_side] to update to a new recruit list.
Re: Movement problem
I am not sure that I understand your question correctly or not, but it sounds me like you just need “passive_leader=yes” in his [ai] tag before doing anything (although it doesn’t mean that his movement is equal to zero)...
Fate of a Princess/feedback thread: "What is in own heart that is the most important, not who you are."
Drake Campaign: Brave Wings/feedback thread, Naga Campaign: Return of the Monster, Saurian Campaign: Across the Ocean
Northern Forces - now on 1.12 server
Drake Campaign: Brave Wings/feedback thread, Naga Campaign: Return of the Monster, Saurian Campaign: Across the Ocean
Northern Forces - now on 1.12 server