how to create a circle around an actor and have it move when the actor moves?
TyDietrich
Member Posts: 45
I want to know how to create a circle around an actor and have it move when the actor moves? i have the circle already animated and it fits around the actor. I just need to know how to spawn the circle around the actor to act as a shield for the actor and then moves as the actor moves.
Comments
Make 2 game integer attributes, name them circle_x and circle_y (or whatever you like). Then in your main actor, constrain circle_x to self.position.x and circle_y to self.position.y and in your circle you constrain the self.position.x to circle_x and self.position.y to circle_y.
Good luck
ok so i have that working, and i put it in a rule that states: when key (x) is down spawn actor (circle) around the main actor. and that works. but when i release the the circle actor stops in its place and no longer follows the main actor. How do i make it so after X is released only one circle is created around the main actor and continues to follow the main actor?
Don't spawn the circle actor. Just make it invisible or place it outside of the stage boundary and then make it visible and/or move it back into position when the key is down.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User