> I guess you would have to check for a command then when a command is recognised then act on it.
>
> mytextbox.text = "Player.Angle.40"
>
> set player.angle to int(tokenat(mytextbox,2,".")
>
> mytextbox.text = "Player.Movement.Horizontal.Right"
>
> set player.x to player.x+1*60*dt
>
> etc.
>
While the second one works, the top one would only allow me to input that value, IE the command only works and sets the value if it is 40
Ah yes, you are right. if the inputted text is "Player.Angle.40" we could check the command without the .40 part so you could do,
system object, compare 2 values,
left(mytextbox,len("Player.Angle")) = "Player.Angle" , set player.angle to int(tokenat(mytextbox,2,".")
so waht you are doing is getting the characters in the string starting from the left for the length of the text without the ".40" and seeing if it matches the command witout the number.