QUOTE |
- added the new keywords "SETVAR,varname" and "GETVAR,varname" which can be used to create your own local variables on a spanwer. These are used in the same way as other SET and GET keywords. These can be useful when you want to use some value repeatedly as in the following example. 1 SETVAR,MyRand/{RND,1,100} 1 SENDMSG/making a hued set with value {GETVAR,MyRand} 1 platelegs/hue/GETVAR,MyRand 1 platehelm/hue/GETVAR,MyRand 1 platechest/hue/GETVAR,MyRand This creates a local variable named MyRand, and sets the value of it to a random number between 1 and 100. Note that the local variables hold string values so by using the {} substitution delimiters you assign it the results of evaluating the RND,1,100 keyword instead of the string "RND,1,100" The contents of the MyRand variable are then used to assign the hue property of the various spawned items using the GETVAR keyword. Local variables are stored as XmlLocalVariable attachments on the spawner and can be viewed and modified using the [getatt command and targeting the spawner. |
QUOTE |
- add the INC and MUL modifiers for values, allowing incremental modification of existing property values instead of just simple assignment. Syntax "propname/INC,value" or "propname/INC,min,max" and "propname/MUL,value" or "propname/MUL,min,max" where the use of the min,max form will use a random value between min and max for the modifiers. This could be used, for example, to take away hit points on a triggering player by using the spawn spec "SETONTRIGMOB/hits/INC,-10". A variant of this would be to set a short min/maxdelay (like 0), turn on proximity detection, and use the spec "SETONTRIGMOB/hits/MUL,0.95". This will work like an area life drain, gradually taking off hits while a player is in range of the spawner. Same could be done for stam or mana etc. Another application would be to add Karma or Fame as part of a mini-quest, "SETONTRIGMOB/fame/INC,100/karma/INC,100", and perhaps subgroup with "SENDMSG/You have gained some fame and karma" Note, any of the items included in the support files that can make item property assignments, such as the switches and levers, can also make use of this (and any of the other non-trigger dependent) keyword. |
QUOTE |
- modified the syntax for referencing attachments using the GET series of keywords. Whereever a property would normally be specified for those keywords, the new property keyword [ATTACHMENT,type,name,property] can be used. For example, to read the value property on an xmlvalue attachment with the name XS on a triggering mob you would specify "GETONTRIGMOB,[ATTACHMENT,xmlvalue,XS,value]". The change involved using [] instead of <> for the ATTACHMENT delimiters. This was to resolve a conflict with the use of the old syntax in conditional tests. The example attachtest1.xml has been modified to reflect the change. |