Follow-up Comment #2, bug #23721 (project wesnoth):

While this sounds like a useful feature i currently dont know how to implement
this, the problem is, that crrently the code which adds those events doesn't
know whether we currently have the first scenario.

> Currently coders can only "create such event" via [filter_condition], wich
has as drawback that event is still loaded but not executed in all scenarios.

You can also remove such events using event ids, you can also have a marco
like this (untested) which makes it easier:


#define FIRST_SCENARIO_EVENT ID CODE
[event]
        name = preload
        first_time_only = yes
        [if]
                [filter_condition]
                        [variable]
                                name = is_not_first_scenario
                                equals = yes
                        [/variable]
                [/filter_condition]
                [then]
                        [remove_event]
                                id = {ID}
                        [/remove_event]
                [/then]
        [/if]
[/event]
[event]
        name = prestart
        first_time_only = yes
        id = set_is_first_scenario
        [set_variable]
                name = is_not_first_scenario
                value = yes
        [/set_variable]
[/event]
[event]
        id = {ID}
        {CODE}
[/event]
#enddef




    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?23721>

_______________________________________________
  Nachricht gesendet von/durch Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
Wesnoth-bugs@gna.org
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to