Hi!
First of all: I love this engine, it was exactly what I was looking for!
Second: If my question has been answered elsewhere, I just didn't find it.
This is the problem:
I have an object, called Bob. This object has an attribute, called agility as integer.
I need a function to do "return a random Int between 1 and THAT attribute of THIS object."
So i tried:
<function name="rollattribute" parameters="object, trait">
msg (GetRandomInt(1,object.trait))
</function>
When calling rollattribute (Bob, "agility") it returns
Error running script: Error compiling expression 'GetRandomInt(1,object.trait)': FunctionCallElement: Could find not function 'GetRandomInt(Int32; Object)'
When calling rollattribute (Bob, agility) it returns
Error running script: Error compiling expression 'agility': Unknown object or variable 'agility'
Nice little fact: A function to roll a fixed stat for THAT object works perfectly well.
<function name="rollagility" parameters="object">
msg (GetRandomInt(1,object.agility))
</function>
everything is fine with that, i can rollagility(Bob) or (player) or whatever.
Could you help me to set up this little function? I bet it has something to do with Int and strings and breeding those (or rather trying to), but I just can point it out.
Thanks in advance!