Orginizind death macros

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
User avatar
Geos
Posts: 115
Joined: March 20th, 2008, 1:58 pm
Location: Italy

Orginizind death macros

Post by Geos »

I am trying to set macros for the deaths of my heros. I have a macros file here

{@campaigns/Love_To_Death/utils/macros.cfg}

This is where i defined some macros. These ones

Code: Select all

#define ON_KAROS_DEATH
    [event]
        name=death
	[filter]
	  description=Karos
	[/filter]
        [message]
	speaker=Aleva
	message= _ "My loyal servant, I can not continue without you. Rest in peace."
	[/message]
	[endlevel]
	result=defeat
	[/endlevel]
    [/event]
#enddef

#define ON_ALEVA_DEATH
    [event]
        name=death
	[filter]
	  description=Aleva
	[/filter]
        [message]
	speaker=Karos
	message= _ "Nooooooo!! do not die, my dearest Aleva!!!!"
	[/message]
	[endlevel]
	result=defeat
	[/endlevel]
    [/event]
#enddef
The macros are suppose to add the death event for both characters. I referenced the file from the campaign file and then tried in each scenario, but nothing, event don't raise.

What am I doing wrong. What is the standard way of saving code repetition for deaths of main characters?

Thank you
That's ridiculous, dragons have no windows...
User avatar
Chris NS
Posts: 540
Joined: May 6th, 2006, 3:22 pm
Location: Where the Queen lives

Re: Orginizind death macros

Post by Chris NS »

Have a look at the WML for Heir to the Throne. That doesn't actually use macros for deaths. Instead, there is a line in every scenario (except the first) referencing a deaths file (file location in {curly brackets} like those). The deaths WML themselves can be found in the /utils/deaths.cfg file.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Orginizind death macros

Post by zookeeper »

Geos wrote:What am I doing wrong.
This:

Code: Select all

name=death
User avatar
Geos
Posts: 115
Joined: March 20th, 2008, 1:58 pm
Location: Italy

Re: Orginizind death macros

Post by Geos »

For whoever reads this thread, if you find yourself in a similar situation and what to know how to solve it, is simple.

The correct name of the death event is die.

So, the correct form is

Code: Select all

[event]
name=die
[/event]
Of course I must credit zookeeper for his help, pointing out what was actually wrong.
That's ridiculous, dragons have no windows...
Post Reply