does event id extend from one scenario to the next

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
winkr7
Posts: 53
Joined: May 16th, 2019, 2:09 pm

does event id extend from one scenario to the next

Post by winkr7 »

Hello;

This question is about the duration of an event id. In the event below I erase it after one use
and the ID is unique because it is once per x,y coord. But that is per scenario. Does this id exist
in the campaign into the next scenario? Do I need to append the scenario name to the id?

(I know first_time_only=yes would have the same effect but the question stands for similar events)

thanks for your time.
yours
winkr7

Code: Select all

    [event]  
        name=enter_hex
	first_time_only=no
	id=paudstatue-{X}-{Y}
        [filter]
			side=1
            		x={X}
			y={Y}
        [/filter]
		[message]
			speaker=narrator
			message= _ "all glory is passing"
		[/message]
		[remove_event]
			id=paudstatue-{X}-{Y}
		[/remove_event]
	[/event]
User avatar
Lord-Knightmare
Discord Moderator
Posts: 2364
Joined: May 24th, 2010, 5:26 pm
Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
Contact:

Re: does event id extend from one scenario to the next

Post by Lord-Knightmare »

winkr7 wrote: October 20th, 2022, 12:50 pm Hello;

This question is about the duration of an event id. In the event below I erase it after one use
and the ID is unique because it is once per x,y coord. But that is per scenario. Does this id exist
in the campaign into the next scenario? Do I need to append the scenario name to the id?

(I know first_time_only=yes would have the same effect but the question stands for similar events)

thanks for your time.
yours
winkr7

Code: Select all

    [event]  
        name=enter_hex
	first_time_only=no
	id=paudstatue-{X}-{Y}
        [filter]
			side=1
            		x={X}
			y={Y}
        [/filter]
		[message]
			speaker=narrator
			message= _ "all glory is passing"
		[/message]
		[remove_event]
			id=paudstatue-{X}-{Y}
		[/remove_event]
	[/event]
If you wish to get events that will be applied to every scenario of a campaign, you can define them directly inside the [campaign][/campaign].
If done that way, they will become global events and be loaded for every scenario of the campaign.

However, this is for mostly some specific event types so not all events will work well with it.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
User avatar
winkr7
Posts: 53
Joined: May 16th, 2019, 2:09 pm

Re: does event id extend from one scenario to the next

Post by winkr7 »

Thanks Lord-Knightmare
User avatar
Ravana
Forum Moderator
Posts: 3009
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: does event id extend from one scenario to the next

Post by Ravana »

When in doubt you can test it, and when you are not convinced test result is correct and will stay correct for future versions, you can include scenario identifier to event id.
Post Reply