I'm always impressed by rexrainbow and his plugins! I don't even know how he come up with all this.
Develop games in your browser. Powerful, performant & highly capable.
Update
Fix a possible bug when save/load.
Thanks a lot
A nice feature would be adding the facing at n-th point... do you think this could be possible?
Thanks a lot A nice feature would be adding the facing at n-th point... do you think this could be possible?
You mean the angle?
Add property "Set angle" , "Expression:AngleOfMotion"
Set property "Set angle" to "Yes" to set object's angle to the angle of motion. Or get this angle of motion by "Expression:AngleOfMotion".
Jeff Skyrunner
Try this new version.
Heh
That's what I was using:
Sprite.Spline.Point(Sprite.Spline.CurSegP1,"x")
Sprite.Spline.Point(Sprite.Spline.CurSegP1,"y")
for
I was trying without using the angle, and this is what I get:
Javascript error! TypeError: seg is null http://localhost:50000/Rex_Spline_behavior.js, line 132 (col 9) This may be a bug in Construct 2 or a third party plugin or behavior - please report it to the developer following the bug report guidelines. Subsequent errors will be logged to the console.[/code:k405usss] I had just add points to the spline path and set it Enabled + made it Start; the problem appears on the "On spline reach last point". [i][u]Edit:[/u][/i] here is the example: [url]https://www.dropbox.com/s/0w81a8w0sqkgef2/Spline%20Rex.capx?dl=0[/url]
Fix a bug of calculating angle of motion.
Fixed.
rexrainbow
Now it works, but I do not see the property "set angle" under the "spline" actions
"set angle" is not an action, it is a property, like official bullet behavior.
My idea was that I could say "in step 1 the sprite must have a facing angle of 10 degrees", "in step 2 the sprite must have a facing angle of 15 degrees", and so on...
I thought it would be possible to set it while adding a point to the path.
+ spline: Condition:On reach any point
+ system compare Expression:CurSegP0 = 0 (1,2,3... )
"Condition:On reach any point" will be triggered while reaching a point, then get the point index by "Expression:CurSegP0"
Create a list at point creation by appending the angle to a variable string.
set variable to variable&","&yourangle
Then get the angle with Sprite.Spline.CurSegP1
Set angle to tokenAt(variable,Sprite.Spline.CurSegP1,",")
Ok, that is a workaround (a nice one .
Just my two cents
Hi. Do you think you're going to implement it in this way or have I to use the workaround?
Many thanks in advance.