Can you change the build-in gravity attribute when you're in game?
FreiGames
Member Posts: 158
As title says.
I need this to make the player able change the gravity of some particles when he/she is in game, and you can only affect particles with the build in gravity attribute, right?
Thanks!
I need this to make the player able change the gravity of some particles when he/she is in game, and you can only affect particles with the build in gravity attribute, right?
Thanks!
Comments
You can create an integer attribute called "player gravity" in the player as a local attribute.
Let's just say it's 300
Then in the player, use the "accelerate" attribute, and make it go down (direction 270)
Then under speed, select the attribute that way it coordinates with that attribute and it's set number.
Then within the actor, you can change the gravity at anytime and it will affect the acceleration.
Hope this helps!
If it is a rule you will need over an over in other actors or instances of actors you can take the rule you have made in your unlock instance and drag it to my behaviors. be sure to name it so you know what it is before dragging to my behaviors. Once there you can go back to the prototype and drag over the custom behavior to your prototype actor. any scene attributes in the rules will look messed up but once you place it in a scene it will fix it self.
One last note. be sure you save a backup before trying this 0.9.0 had a bug where this messed up the project, but codemonkey said it should have been fixed with 0.9.1 update.
Good luck I hope that helps
ButterBeans, yeah that's what I usually do, though I NEED to use the built-in attribute since it needs to affect particles, and that can only be done with that attribute, but thanks for the reply anyways.