Full Version : Amending String values
xmlspawner >>Q&A >>Amending String values


<< Prev | Next >>

Steelcap- 12-09-2006
Is it possible to amend a property value?

I'm trying to rig a spawner that will create a list. Lets say for example people who trigger the spawner. When they trigger it I want to add their name to a list. Can this be done? Can I set the text of a book to be GET + TRIGMOB?



ArteGordon- 12-10-2006
appending to a string is easy. Writing text to a book is harder and would require scripting access to book contents.

In general, to append strings use the string substitution brackets to do something like

SETONTHIS/name/{GETONTHIS,name} {GETONTRIGMOB,name}

since it is just substituting strings before it actually parses the entire entry, you can also do things like

SETONTHIS/name/{GETONTHIS,name} : {GETONTRIGMOB,name}

if you wanted to put colons between the old and new strings, or

SETONTHIS/name/{GETONTHIS,name} ({GETONTRIGMOB,name})

to put the new string in parentheses

Steelcap- 12-10-2006
Great! Thanks.