URL:
  <http://gna.org/bugs/?18713>

                 Summary: Creating a WML event handler inside another and
firing it immediately afterwards does not work
                 Project: Battle for Wesnoth
            Submitted by: shadowmaster
            Submitted on: Wed 21 Sep 2011 11:47:00 PM CLT
                Category: Bug
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: WML
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.9.9
        Operating System: Debian 6.0

    _______________________________________________________

Details:

In the mainline test scenario, the following code addition, which should
result in an empty map with no units after all other prestart event handlers
have been processed, will not work as expected in practice, as the handler for
"foobar" appears to not be effective until the parent handler that introduces
it is finished:


[test]
    [...]

    [event]
        name=prestart
        [event]
            name=foobar
            first_time_only=no
            [kill]
                x=1-1000
                y=1-1000
            [/kill]
        [/event]

        [fire_event]
            name=foobar
        [/fire_event]
    [/event]
[/test]


The following *will* work:


[test]
    [...]

    [event]
        name=foobar
        first_time_only=no
        [kill]
            x=1-1000
            y=1-1000
        [/kill]
    [/event]

    [event]
        name=prestart
        [fire_event]
            name=foobar
        [/fire_event]
    [/event]
[/test]


So will this, by firing the "foobar" event from a different, later handler:


[test]
    [...]

    [event]
        name=prestart
        [event]
            name=foobar
            first_time_only=no
            [kill]
                x=1-1000
                y=1-1000
            [/kill]
        [/event]
    [/event]

    [event]
        name=start
        [fire_event]
            name=foobar
        [/fire_event]
    [/event]
[/test]





    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to