Quickly setting a variable's value based on difficulty

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
quantumfleet
Posts: 38
Joined: June 17th, 2011, 1:26 am

Quickly setting a variable's value based on difficulty

Post by quantumfleet »

Using #ifdef EASY, #ifdef MEDIUM, etc. tags are possible, but very time-consuming. A while back, I discovered a workaround I'd like to share:

Code: Select all

[set_variable]
name=foo
{QUANTITY value easy medium hard}
[/set_variable]
It's vitally important that the first argument for the QUANTITY macro is value - that gets turned into a key for the [set_variable] tag. Everything else can be changed to suit your needs.
Currently working on various ideas using 1.9.8.9
Post Reply