Discussion and feedback on Construct 2

### » Thu Jan 24, 2013 9:41 pm

How do you set an instance variable to <varies>. I sorta get how it comes to that, but what circumstances result in <varies> being displayed in the properties bar? Like, if I edited the initial value, how do I get it back to <varies>?
I'm seeking Narnia. Who wants to come with me! Aslan is on the move!
B
117
S
20
G
8
Posts: 744
Reputation: 13,779

### » Mon Sep 02, 2013 5:33 pm

I saw this somewhere a while ago and have been hunting for it for HOURS! You sir, are amazing. Thank you sooooo much.
B
8
Posts: 10
Reputation: 357

### » Sat Mar 28, 2015 1:11 am

set x to (2*t^3-3*t^2+1)*p(n).x + (t^3-2*t^2+t)*(p(n+1).x-p(n-1).x)/2 + (-2*t^3+3*t^2)*p(n+1).x + (t^3-t^2)*(p(n+2).x-p(n).x)/2
set Y to (2*t^3-3*t^2+1)*p(n).y + (t^3-2*t^2+t)*(p(n+1).y-p(n-1).y)/2 + (-2*t^3+3*t^2)*p(n+1).y + (t^3-t^2)*(p(n+2).y-p(n).y)/2
it must be written by Albert Einstein !
B
15
S
5
Posts: 192
Reputation: 1,514

### » Sat Apr 16, 2016 5:34 pm

R0J0hound wrote:Here is a way to do a spline though waypoints:
http://dl.dropbox.com/u/5426011/example ... llrom.capx

A plugin could be made to hide the formula, but there isn't a way to make an in IDE node editor at this time.

Is it okay if I ask how you came up with the original spline? Is there a concept you followed to help you come up with the math inside of the 'Set position' action? I ask because I would really like direction in improving my own programming skills - of which I have none.

Edit: Lol, I didn't realize the actual name of the capx was the hint I needed.

Edit2: For anyone, like me, that couldn't get the array version working properly, you need to replace p.Count with Array.Width and (n-1) % Array.Width with n > 0 ? (n-1) % Array.Width : Array.Width-1, since when n = 0, you get -1, and I don't know how using -1 as an index affects arrays.
B
11
S
3
Posts: 20
Reputation: 780

### » Tue Apr 19, 2016 8:56 am

B
82
S
26
G
62
Posts: 4,830
Reputation: 45,200

### » Tue Apr 19, 2016 12:30 pm

R0J0hound wrote:https://dl.dropboxusercontent.com/u/5426011/examples33/multi_catmull_rom.capx

This will come useful. Thank you.
B
107
S
28
G
15
Posts: 1,201
Reputation: 17,548

### » Tue Dec 20, 2016 4:01 am

Egyptoon wrote:set x to (2*t^3-3*t^2+1)*p(n).x + (t^3-2*t^2+t)*(p(n+1).x-p(n-1).x)/2 + (-2*t^3+3*t^2)*p(n+1).x + (t^3-t^2)*(p(n+2).x-p(n).x)/2
set Y to (2*t^3-3*t^2+1)*p(n).y + (t^3-2*t^2+t)*(p(n+1).y-p(n-1).y)/2 + (-2*t^3+3*t^2)*p(n+1).y + (t^3-t^2)*(p(n+2).y-p(n).y)/2
it must be written by Albert Einstein !

I was trying to understand and know where this came from and then I find it.

in this PDF there is a small explanation on how to get those positions from X and Y: http://algorithmist.net/docs/catmullrom.pdf
(it is formula number [7] in the PDF)

now I have to understand everything.
B
41
S
24
G
67
Posts: 202
Reputation: 37,550

Previous