Small WML Improvement

Discussion of all aspects of the game engine, including development of new and existing features.

Moderator: Forum Moderators

Post Reply
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Small WML Improvement

Post by Dave »

I have added a new feature to WML to make it slightly less verbose. I've always found it irritating that you have to write e.g.

Code: Select all

x=12
y=18
To specify a co-ordinate pair. So, I've added a feature to the language that allows you to specify it on the same line:

Code: Select all

x,y=12,18
This isn't a co-ordinate specific feature -- any set of values can be initialized like this. E.g.

Code: Select all

red,green,blue=200,0,0
Also, if you don't specify as many values as you do attributes, all the attributes without values will use the last value. That means that referring to my proposal for a better tiling system, instead of having to go,

Code: Select all

n=~h
ne=~h
se=~h
sw=~h
nw=~h
You could simply go,

Code: Select all

n,ne,se,sw,nw=~h
David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
User avatar
turin
Lord of the East
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas
Contact:

Post by turin »

you cannot do something like this:

Code: Select all

x=1,2,3,4
y=4,3,2,1
in this new way, correct? (and yes, i realize that you could still just do it like above)
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
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

turin wrote:you cannot do something like this:

Code: Select all

x=1,2,3,4
y=4,3,2,1
in this new way, correct? (and yes, i realize that you could still just do it like above)
No you can't do something like that.

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
Post Reply