Duffer123 Report post Posted October 15, 2017 @Ant, Bear with me on this one - I think it's a brilliant idea if it could be done. So, when you are creating an Integer or Float variable (as above), how about you had a tick box underneath with something like "Integer/Float contains variables formulae". Then instead of a straight 12 or 9.2 you put "[V-B-0]+[V-F-2]/[P-I-1]*[V-I-3]" - something that recognises */+-% operands and all Bool, Integer and Float variables. Cast in to a resultant Int if you want to generate an int, cast in to a float if you want to generate a float. Perhaps have bools counting as either 0 (false) or 1 (true) which, when you think about it, would be v useful too. That way you can have formula calculated Integer and Float variables. This would help enormously with stuff like Progression, damage calcs and so on...? I appreciate it would be a big new thing, and maybe for a later release (after 2D and RPG) but.... hope you can see why it would hugely boost functionality...? Quote Share this post Link to post Share on other sites
Amaranth Report post Posted October 16, 2017 Love this idea. Let me think about the different ways to implement this. Quote Share this post Link to post Share on other sites
Duffer123 Report post Posted October 16, 2017 @Ant, My instinct is you go the Regex regular expressions route but perhaps there is a much more straightforward route with Eval... https://www.codeproject.com/Articles/13779/The-expression-evaluator-revisited-Eval-function-i On regular expression route, once you've made your string: https://stackoverflow.com/a/36062480 Quote Share this post Link to post Share on other sites
Amaranth Report post Posted October 17, 2017 I agree, Regex is probably the answer here. Quote Share this post Link to post Share on other sites
Duffer123 Report post Posted October 17, 2017 Or some sort of Eval method... Quote Share this post Link to post Share on other sites