Hi, Construct2 noob here (only been playing with it a week but very impressed by the possibilites, so thanks!)
I'm trying to implement sprite movement that involves resolving various forces that are represented as 2d vectors. As an example, think of the classic BOIDs flocking example (http://www.red3d.com/cwr/boids/), in which the movement of each object is influenced by combining forces reflecting desire for alignment, cohesion, and separation.
To do this, I'd like to be able to assign arbitrary vector variables to an instance and then perform standard functions on those vectors (addition, multiplication, normalisation, dot and cross products etc.) in order to calculate the appropriate acceleration to apply. However, it doesn't seem possible to assign or manipulate vectors - the only types of instance variables available are Boolean, Text, and Number (and I really don't want to have to separate out my vectors into separate X and Y components...)
I see that the Custom Movement behaviour exposes properties such as dx/dy, acceleration, and Angle etc., which means I guess that Construct 2 must already have a 2d vector library internally that has all these functions, but am I correct in saying that it's not exposed anywhere else?
What would be the best way to implement this? A plugin? (has anybody already done one?)
Any advice would be gratefully received!