Difference between revisions of "Getting started with TSFC"
a new function
imported>DragoonWraith (TESS -> TESDB) |
imported>Tibixe (a new function) |
||
Line 129: | Line 129: | ||
The script is ready to be used. Assign it to a spell and try it yourself. | The script is ready to be used. Assign it to a spell and try it yourself. | ||
The | ==A new function== | ||
This method is quite complicated. The next release of TSFC (0.5) will introduce a new function, StrExpr. It evaluates an expression and writes its result to the string given as argument. | |||
The above script could be rewritten using it as: | |||
short playername | |||
short itemname | |||
begin ScriptEffectStart | |||
set itemname to StrGetName | |||
set playername to player.StrGetName | |||
StrExpr itemname "${playername}'s ${itemname}" | |||
StrSetName itemname | |||
StrDel playername | |||
StrDel itemnamename | |||
end | |||
==Behind the scenes== | ==Behind the scenes== |