Recently I want to allow the player to program behaviors into objects. My question is how to allow the player to use math functions and the object's variables.
Lets say the object has an speed value. I currently have a dialog box that pops up and asks for a number to describe the speed. How would I allow the player to set the speed using mathmatical operators while addressing other field values within the object?
Maybe te player would like to set the speed based on another field variable coupled with some operators. Can this be done? Can they type in "cos(direction)*13" and operations such as this?
Lets say the object has an speed value. I currently have a dialog box that pops up and asks for a number to describe the speed. How would I allow the player to set the speed using mathmatical operators while addressing other field values within the object?
Maybe te player would like to set the speed based on another field variable coupled with some operators. Can this be done? Can they type in "cos(direction)*13" and operations such as this?