Endlevel Conditions
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.
- LordAwsomeness
- Posts: 203
- Joined: August 12th, 2013, 2:20 pm
- Location: U.S.A.
Endlevel Conditions
Hi so I have made a scenario where it is players 1-4 vs player 5 and I am trying to create endlevel conditions that allow for one side to win and for the opposing side to lose and vice versa. Everytime I create code such as the following, it doesn't fire it for both teams, just the first endlevel. so essentially one team either wins or loses and nothing happens to the other team.
if you understand how to fix this please let me know!
Code: Select all
[event]
name=new turn
first_time_only=no
[if]
{VARIABLE_CONDITIONAL la_village.count less_than_equal_to 1}
[then]
[endlevel]
result=defeat
side=1,2,3,4
[/endlevel]
[endlevel]
result=victory
side=5
[/endlevel]
[/then]
[/if]
[/event]
- Been playing Wesnoth since 2004 and the 1.0.x versions.
- Creator of Undead Invasion MP Scenario Pack.
- Creator of Valeria MP Adventure
- Creator of LA_RPG ERA
- Creator of Undead Invasion MP Scenario Pack.
- Creator of Valeria MP Adventure
- Creator of LA_RPG ERA
- James_The_Invisible
- Posts: 534
- Joined: October 28th, 2012, 1:58 pm
- Location: Somewhere in the Northlands, fighting dark forces
- Contact:
Re: Endlevel Conditions
It looks like that only the first [endlevel] tag is taken into account. Fortunately, since 1.13.0 we can set different results for different sided with 1 [endlevel]. The wiki says that it is done this way (untested):LordAwsomeness wrote: ↑January 30th, 2020, 9:09 pm Hi so I have made a scenario where it is players 1-4 vs player 5 and I am trying to create endlevel conditions that allow for one side to win and for the opposing side to lose and vice versa. Everytime I create code such as the following, it doesn't fire it for both teams, just the first endlevel. so essentially one team either wins or loses and nothing happens to the other team.
if you understand how to fix this please let me know!Code: Select all
[event] name=new turn first_time_only=no [if] {VARIABLE_CONDITIONAL la_village.count less_than_equal_to 1} [then] [endlevel] result=defeat side=1,2,3,4 [/endlevel] [endlevel] result=victory side=5 [/endlevel] [/then] [/if] [/event]
Code: Select all
[endlevel]
[result]
result=defeat
side=1,2,3,4
[/result]
[result]
result=victory
side=5
[/result]
[/endlevel]
Last edited by James_The_Invisible on January 31st, 2020, 5:35 pm, edited 1 time in total.
My content: For Power series
Ports: Danse Macabre Story of the Wose
Guides: How to translate your UMC
Ports: Danse Macabre Story of the Wose
Guides: How to translate your UMC
- Pentarctagon
- Project Manager
- Posts: 5564
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Endlevel Conditions
Moved to the WML Workshop.
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