# Node based expression editor

### » Tue Dec 04, 2012 5:58 am

I took this the example I did here:
...and extended it so I can add/destroy nodes and change the values of nodes.

Here is a screenshot of a setup that make the car move forward and rotate.

Here's the capx, the art is programmer art so it's very ugly:
http://dl.dropbox.com/u/5426011/examples16/nodes2.capx
Left click to drag nodes and lines.
Right click to open context menu.R0J0hound2012-12-04 06:00:39
B
94
S
33
G
128
Posts: 5,489
Reputation: 81,541

### » Tue Dec 04, 2012 11:59 am

What would be the purpose of those ?
B
43
S
18
G
17
Posts: 2,247
Reputation: 17,556

### » Tue Dec 04, 2012 5:14 pm

The purpose of the setup in the image?
It equates to these 3 actions to move the car:
Set x to car.x + 4*cos(car.angle)
Set y to car.x + 4*sin(car.angle)
Set Angle to car.Angle+1

Or do you mean the purpose of the capx itself?
It's mainly for my own amusement.
B
94
S
33
G
128
Posts: 5,489
Reputation: 81,541

### » Mon Feb 11, 2013 9:32 pm

R0J0hound, what an amazing piece of work! I can't believe I missed this before.

Your example relates directly to something I'm working on. I hope you don't mind if I shamelessly appropriate your hard work.
Don't see the fnords and they won't eat you!
B
79
S
17
G
12
Posts: 323
Reputation: 11,855

### » Tue Feb 12, 2013 6:14 am

If that's the case then here is an updated version that is easier on the eyes among many other things:
http://dl.dropbox.com/u/5426011/examples16/nodes3.capx

FYI the nodes evaluate somewhat like a circuit so values can take time to move through the nodes.

B
94
S
33
G
128
Posts: 5,489
Reputation: 81,541

### » Tue Feb 12, 2013 9:09 am

R0johound..... this.is.so.cool.
B
30
S
8
G
4
Posts: 215
Reputation: 5,082

### » Tue Feb 12, 2013 11:23 am

Thanks R0J0!
Don't see the fnords and they won't eat you!
B
79
S
17
G
12
Posts: 323
Reputation: 11,855

### » Tue Feb 12, 2013 2:47 pm

Awesome example.

Too bad we can't save to xml. Seems that would be perfect for a save state.
B
173
S
50
G
194
Posts: 8,562
Reputation: 121,360