dummy events

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
turin
Lord of the East
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas
Contact:

dummy events

Post by turin »

It would be nice if you could trigger events by WML... its somewhat hard to explain, so I'll give an example.

You want an event to fire if someone moves somewhere OR you kill someone. This is currently possible, but in a hacky and long-winded way. With this feature, you could:

(pseudocode)

Code: Select all

[event]
name=moveto
   [filter]
   blah blah blah
   [/filter]
   [trigger_event]
   name=ithappens
   [/trigger_event]
[/event]
[event]
name=die
   [filter]
   blah blah blah
   [/filter]
   [trigger_event]
   name=ithappens
   [/trigger_event]
[/event]
[event]
name=ithappens
   blah blah blah
[/event]
It would be really useful to either have this, or have an event triggerable in multiple ways (so, [event] name=moveto,die), and this way seems more possible.
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
scott
Posts: 5248
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

Make a macro.
Hope springs eternal.
Wesnoth acronym guide.
User avatar
turin
Lord of the East
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas
Contact:

Post by turin »

scott wrote:Make a macro.
Yeah, but that takes more code and slows down the processor.
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
scott
Posts: 5248
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

turin wrote:
scott wrote:Make a macro.
Yeah, but that takes more code and slows down the processor.
Correction: it takes more WML but less code and slows down the preprocessor. I'm all for extending WML to provide new functionality. Either way you have to make 2 events. The idea where name= takes a list is intriguing, but there would be problems where the filters, filter seconds, unit, second unit, x1,y1, and x2,y2 have conflicting meanings.
Hope springs eternal.
Wesnoth acronym guide.
User avatar
turin
Lord of the East
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas
Contact:

Post by turin »

scott wrote:Correction: it takes more WML but less code and slows down the preprocessor. I'm all for extending WML to provide new functionality. Either way you have to make 2 events. The idea where name= takes a list is intriguing, but there would be problems where the filters, filter seconds, unit, second unit, x1,y1, and x2,y2 have conflicting meanings.
Err, right. Anyway, just a suggstion for if a coder wants to implement it. I thought of it while coding a scenario and finding it really frustrating to have to duplicate hundreds of lines of WML (I have a macro-phobia, so I didn't use any).
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
scott
Posts: 5248
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

turin wrote:(I have a macro-phobia, so I didn't use any).
I noticed. I'm a macrophiliac.
Hope springs eternal.
Wesnoth acronym guide.
User avatar
Cuyo Quiz
Posts: 1777
Joined: May 21st, 2005, 12:02 am
Location: South America

Post by Cuyo Quiz »

*stops in his stroll*

You guys and your funky New Age diets.

*resumes strolling*
Cuyo Quiz,where madness meets me :D
Turn on, tune in, fall out.
"I know that, but every single person nags about how negative turin is; it should be in the FPI thread "Turin should give positive comments" =)"-Neorice,23 Sep 2004
Post Reply