Expression editor

New releases and general discussions.

Post » Sat Aug 30, 2008 5:39 pm

The expression editor needs to basically be made nicer with formatting etc.

Making the first set of brackets you're in bold would be a tremendous help, so like
sin(420+random(9999*abs(1-sprit|e.x))) if | is the cursor

colour coding on functions, system expressions, etc

I'd quite like to be able to define my own functions like faggatron(x)=sin(x*29+x^2)+7*cos(x) and be able to put that into the expression editor, if these functions were saved in your settings and you could use them in everything you made it would be very nice. Maybe if you mouseover it (or something) it replaces it with the actual expression for the function.
Just because a lot of the maths I'm doing in these expressions is very similar a lot of the time, this would be a nice way to speed things up. (Though I guess it's not a particularly high priority)
B
2
S
2
G
5
Posts: 236
Reputation: 2,122

Post » Sat Aug 30, 2008 5:42 pm

Python would allow you to define custom functions and reuse them; it's probably a bit complex to do via expressions, though you could use the Function object to achieve it.

Bolded brackets is a good idea, as are some other formatting additions.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Sat Aug 30, 2008 5:53 pm

I spose it doesnt really matter anyway heh...
Currently I am not using python at all because it gave me a thousand error messages at runtime a couple of builds ago which put me off initially, and every time I try to add it it gives me another one [size=75:nv9pqag5](keep forgetting to bugtracker it - I'll do it in a sec)[/size:nv9pqag5] at the start of using it... "Import error: No module named zipfile". Does this happen to everyone or just me? It's literally when I add one line of python.
B
2
S
2
G
5
Posts: 236
Reputation: 2,122

Post » Sun Aug 31, 2008 9:55 pm

[quote="faggatron":vn7g17uy]I'd quite like to be able to define my own functions like faggatron(x)=sin(x*29+x^2)+7*cos(x)[/quote:vn7g17uy]
Use the Function Object. You could define Function.MyFunc(x) to mean that.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Sun Aug 31, 2008 11:04 pm

oh wow didnt realise you could do that, thats brilliant thanks!
B
2
S
2
G
5
Posts: 236
Reputation: 2,122


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 3 guests