All leaders are dieing simultaneosly...

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
roadkill
Posts: 92
Joined: November 3rd, 2008, 11:48 am

All leaders are dieing simultaneosly...

Post by roadkill »

Sorry If you guys are sick of me, seems like im back here everyday!

I've made a few Ai sides on a map (there are 5 ai sides in total) all linked to the same team "Creep" so they won't attack each-other.

an example of the code I have used for all of them is this

Code: Select all

[side] 
side=5 
controller=ai 
team_name=Creep
canrecruit=1
allow_player=no
role=boss
income=100
gold=200
recruitment_ignore_bad_movement=yes 
recruitment_ignore_bad_combat=yes 
village_gold=2
type="Dwarvish Fighter" 
recruit="Dwarvish Guardsman,Dwarvish Fighter,Dwarvish Ulfserker,Dwarvish Thunderer,Thief,Poacher,Footpad,Gryphon Rider"
[ai] 
passive_leader=yes 
grouping=no
aggression=1.0 
ai_algorithm=default 
village_value=-50.0 
leader_value=50.0 
[/ai] 
[/side]
The problem I am having is that when killing one of the leaders all of the leaders die simultaneously, (all the enemy units on the map die also) & I get a victory message.

I have studied the SurvivalXtreme code, I couldn't find anything (code wise) in those scenarios that would stop this happening...

Does anyone here know what is happening?
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: All leaders are dieing simultaneosly...

Post by zookeeper »

roadkill wrote:The problem I am having is that when killing one of the leaders all of the leaders die simultaneously, (all the enemy units on the map die also) & I get a victory message.
Well, presumably you have some code somewhere which makes that happen.
User avatar
doofus-01
Art Director
Posts: 4131
Joined: January 6th, 2008, 9:27 pm
Location: USA

Re: All leaders are dieing simultaneosly...

Post by doofus-01 »

Do you use [kill] tags anywhere? Or [store_unit]...kill=yes...? Bad filtering on that can cause such things.

But you did not give enough information for anyone to figure this out.
(Zookeeper is probably tired of telling people this.)
roadkill
Posts: 92
Joined: November 3rd, 2008, 11:48 am

Re: All leaders are dieing simultaneosly...

Post by roadkill »

I try to be as specific as I can, I don't want to just dump my code on people and ask whats wrong.

But Thanks Doofus!

Yeh I had kill tags killing everything, god knows what I was thinking (I certainly don't).

Code: Select all

[event]
name=die
[filter]
x=$x1
y=$y1
side=3,4,5,6,7,8
canrecruit=1
[/filter]
[filter_second]
side=1
[/filter_second]
[kill]
side=3,4,5,6,7,8
[/kill]
[/event]

[event]
name=die
[filter]
x=$x1
y=$y1
side=3,4,5,6,7,8
canrecruit=1
[/filter]
[filter_second]
side=2
[/filter_second]
[kill]
side=3,4,5,6,7,8
[/kill]
[/event]

[event]
name=die
first_time_only=no
[if]
[have_unit]
x=$x2
y=$y2
side=1
[/have_unit]
[then]
[gold]
side=1
amount=5
[/gold]

[/then]
[/if]

[if]
[have_unit]
x=$x2
y=$y2
side=2
[/have_unit]
[then]
[gold]
side=2
amount=5
[/gold]



[/then]
[/if]
[/event]
I copied this from the great race code for earning money when you kill something... I didn't know what the kill bit did :S.

Thanks again doofus.
Post Reply