Quickly setting a variable's value based on difficulty
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.
-
- Posts: 38
- Joined: June 17th, 2011, 1:26 am
Quickly setting a variable's value based on difficulty
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:
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.
Code: Select all
[set_variable]
name=foo
{QUANTITY value easy medium hard}
[/set_variable]
Currently working on various ideas using 1.9.8.9