Why doesn't this work
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.
Why doesn't this work
I've checked all over this, and looked at examples of how other poeple have used it, but I just don't get why this isn't working:
and the code I used to add it to the scenario (with loads edited out, to make for easier reading):
I also referenced it and the file that it's in in the Invasion_of_Arendia file (also with tons edited out):
Help please (this is why I never used custom macros before, but I thoughth that doing the death events would be an easy, non essential way of practicing, and saving space in the scenario files.[/code]
Code: Select all
#textdomain wesnoth-Invasion_of_Arendia
#define DEATHS_IOA
[event]
name=die
[filter]
description=Reth
[/filter]
[message]
speaker=unit
message= _ "I... I don't think I can make it anymore."
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
[event]
name=die
[filter]
description=Teresa
[/filter]
[message]
speaker=unit
message= _ "Now I can't reclaim any throne, let alone my own."
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
[event]
name=die
[filter]
description=Sarah
[/filter]
[message]
speaker=unit
message= _ "Reoed, help me, I'm dieing!"
[/message]
[message]
description=Reoed
message= _ "No, don't die, I love you too much for you to die."
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
[event]
name=die
[filter]
description=Tom
[/filter]
[message]
speaker=unit
image=portraits/Tom.png
message= _ "Brother, help me!"
[/message]
[message]
description=Matt
image=portraits/Matt.png
message= _ "Tom! no don't die on me now, not after all we've been through"
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
[event]
name=die
[filter]
description=Reoed
[/filter]
[message]
speaker=unit
message= _ "No, I'm too young to die. Sarah, I love you."
[/message]
[message]
description=Sarah
message= _ "(sniff) I love you too."
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
[event]
name=die
[filter]
description=Matt
[/filter]
[message]
speaker=unit
image=portraits/Matt.png
message= _ "Brother, help me!"
[/message]
[message]
description=Tom
image=portraits/Tom.png
message= _ "Matt! no don't die, I can't live without my other half."
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
[event]
name=die
[filter]
description=Jaryn
[/filter]
[message]
speaker=unit
message= _ "For the Sidhe!"
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
#enddef
Code: Select all
[scenario]
{DEATHS_IOA}
[/scenario]
Code: Select all
#ifdef CAMPAIGN_INVASION_OF_ARENDIA
[+units]
{@campaigns/Invasion_of_Arendia/units/arendian_units}
{@campaigns/Invasion_of_Arendia/units/elemental_units}
{@campaigns/Invasion_of_Arendia/units/hoard}
{@campaigns/Invasion_of_Arendia/units/human}
{@campaigns/Invasion_of_Arendia/units/nagas}
{@campaigns/Invasion_of_Arendia/units/wild_elves}
[/units]
{@campaigns/Invasion_of_Arendia/units}
{@campaigns/Invasion_of_Arendia/images}
{@campaigns/Invasion_of_Arendia/scenarios}
{@campaigns/Invasion_of_Arendia/utils/deaths.cfg}
{@campaigns/Invasion_of_Arendia/utils}
#endif
Help please (this is why I never used custom macros before, but I thoughth that doing the death events would be an easy, non essential way of practicing, and saving space in the scenario files.[/code]
Try switching the places of these two:
...so that deaths.cfg will get included before the scenarios (and, if that solves the issue, naturally make the other utils be included before the scenarios as well).
Code: Select all
{@campaigns/Invasion_of_Arendia/scenarios}
{@campaigns/Invasion_of_Arendia/utils/deaths.cfg}
A macro should always be defined before the place where it needs to be used. wiki/PreprocessorRef
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."