Setting particle gravity not working

For questions about using Classic.

Post » Fri Jul 10, 2015 2:54 am

I'm trying to get the particles to change it's angle to that of the player, and also to change the particle's gravity angle to the position of the player, but it isn't working. Help?

EDIT: I hope you like reading boring, plain code

Code: Select all
Start of layout:              [Particles]: Destroy

On left mouse button clicked: [System]: Create object [Particles] on [Layer 1] at (Sprite.X, Sprite.Y)
                              [Particles]: Set X to (Sprite.X)
                              [Particles]: Set Y to (Sprite.Y)
                              [Sprite]: Set angle to Angle(Sprite.X, Sprite.Y, Mouse.X ,Mouse.Y)
                              [System]: Set global variable  'PlayerAngle' to (Sprite.Angle)
                              [Sprite]: Destroy
                              [System]: Create object [Sprite] on [Layer 1] at (MouseX, MouseY)
                              [Sprite]: Set angle to global('PlayerAngle')
                              [Particles]: Set angle to global('PlayerAngle')
                              [Particles]: Set angle to global('PlayerAngle')
B
2
Posts: 2
Reputation: 154

Post » Fri Jul 10, 2015 5:08 am

It seems you have indeed found a bug in Construct Classic (there are quite a few!), but I think I have a work-around :)

After setting Gravity Angle, set the gravity strength again as well, even if that number doesn't change it seems to have fixed the issue for me!

Here is a CAP example (I put the gravity in the opposite angle of the particles themselves to show that it works!! Just remove the + 180 to have gravity the same direction as the particle object)

https://dl.dropboxusercontent.com/u/471 ... ticles.cap

Hope that helps :) And yes, I do like reading boring code! Although event sheets are more fun
Construct Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
127
S
43
G
18
Posts: 2,240
Reputation: 20,592

Post » Fri Jul 10, 2015 5:30 am

there is also a angle particle bug on boolean (particle property)
hop ashley will solve it soon
B
46
S
16
G
8
Posts: 802
Reputation: 8,351

Post » Fri Jul 10, 2015 5:35 am

Thanks, it works! You are my saviour!
B
2
Posts: 2
Reputation: 154

Post » Fri Jul 10, 2015 6:23 am

@matrixreal

This is the Construct Classic section - Ashley doesn't live here anymore!
If your vision so exceeds your ability, then look to something closer.
Moderator
B
137
S
31
G
87
Posts: 5,554
Reputation: 60,452


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest