how to stop scrolling to the leader

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
Mathijs
Posts: 146
Joined: May 23rd, 2007, 10:38 am
Location: Belgium

how to stop scrolling to the leader

Post by Mathijs »

If wondered if there's a way to stop the game from scrolling every turn to the leader. I want to do this because in the first few turns the ai isn't doing anything but sitting there. (They are city guards, they shouldn't attack my units as they are friendly units and there's no enemy in that scenario (that's why the guards are another 'hostile' side)
It's a bit weird seeing the game scroll to the leader who then does nothing :?

I can achieve this by putting controller=null but then you win the scenario after one turn, because there is no enemy.

mat
User avatar
Viliam
Translator
Posts: 1341
Joined: January 30th, 2004, 11:07 am
Location: Bratislava, Slovakia
Contact:

Post by Viliam »

I am not sure. If the problem is losing because there is no enemy, maybe try this:

Code: Select all

[scenario]
  ...
  victory_when_enemies_defeated=no
  ...
[/scenario]
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

I'm not completely sure if this works, but based on a very crude test (which wasn't done completely right) it looks like you can: just set the canrecruit= of the AI leader to 0 in a side turn event and restore it in an ai turn event. Worth a try anyway.
Rhuvaen
Inactive Developer
Posts: 1272
Joined: August 27th, 2004, 8:05 am
Location: Berlin, Germany

Post by Rhuvaen »

If this works, it'll be another gem for my WML treasure trove (even if it's another one of those rough-cut ones). :D
Troy
Posts: 152
Joined: May 9th, 2007, 12:55 am
Location: some where,but not sure where
Contact:

Re: how to stop scrolling to the leader

Post by Troy »

Mathijs wrote:If wondered if there's a way to stop the game from scrolling every turn to the leader. I want to do this because in the first few turns the ai isn't doing anything but sitting there. (They are city guards, they shouldn't attack my units as they are friendly units and there's no enemy in that scenario (that's why the guards are another 'hostile' side)
It's a bit weird seeing the game scroll to the leader who then does nothing :?

I can achieve this by putting controller=null but then you win the scenario after one turn, because there is no enemy.

mat

I know how you feel, one of my campaign map is huge and sice the AI do nothing for 5 turns it is a pain.
well, all for the better good than for the bad good.

new forum
Mathijs
Posts: 146
Joined: May 23rd, 2007, 10:38 am
Location: Belgium

Post by Mathijs »

well I solved the fact that my AI is doing nothing by setting:

Code: Select all

  [scenario]
   ...
   victory_when_enemies_defeated=no
   ...
  [/secenario]
Because this allows me to set both teams to the same team. (as Viliam pointed out nicely, thank you!)

So the scrolling thing isn't such a pain in the ass anymore. I've tried what zookeeper proposed but it didn't work!

greetz,
mat
Post Reply