All leaders are dieing simultaneosly...
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.
All leaders are dieing simultaneosly...
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
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?
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]
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?
Re: All leaders are dieing simultaneosly...
Well, presumably you have some code somewhere which makes that happen.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.
Re: All leaders are dieing simultaneosly...
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.)
But you did not give enough information for anyone to figure this out.
(Zookeeper is probably tired of telling people this.)
Re: All leaders are dieing simultaneosly...
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).
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.
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]
Thanks again doofus.