Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to Customize Math Expression Using Strings?

Is there any way to customize a math expression using a string variable which contains the intended expression? Unless of course there are better options than math expressions? The main objective here is for the users to be able to write an expression in the UI which will then be calculated. By the way the number of the parameters of the math expression is definite, 3 to be exact.

Or a brief version of this question: Can I write functions and make them work during gameplay? And this function takes no more or no less than 3 parameters. Since math expressions` expressions are essentially strings in the way I understand it, I should also be able to pass it a string variable as its expression. If this could not work for now, might I suggest that the next version of UE4 include this feature.

Thanks in advance! :)

Product Version: UE 4.21
more ▼

asked Dec 13 '18 at 09:55 PM in Blueprint Scripting

avatar image

47 4 4 10

avatar image Tuerer Dec 14 '18 at 10:09 AM

Although expressions look like strings in the node heading, I'm not sure that's how they work. When you write an expression and double click the Math Expression node, you can see that it's the same as just some collapsed nodes in a blueprint, and you can not change the nodes at runtime.

avatar image ANoobyBird Dec 14 '18 at 11:36 AM

Then it`s a real pity. Now that the nodes can`t be changed at runtime, can I actually use some other softwares specialized in symbolic operations to do the calculations for me, and output the results to UE4?

Or in fact any advice on how to achieve the effect of calculating/doing user-defined functions/instructions at runtime in UE4?


(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question