Move sprite A around sprite B, sprite C and then D

Get help using Construct 2

Post » Wed Aug 05, 2015 4:41 am

i want to move a sprite A around sprite B and after my sprite A detect a sprite C then my sprite A will move around the sprite C, if sprite C is destroyed then the sprite A will move around sprite B, if sprite B is destroyed then sprite A will move around sprite D, Pathfinding Behavior its the best way to do this? i cant use Pin behavior because i want natural moving.
B
9
S
3
Posts: 142
Reputation: 1,108

Post » Wed Aug 05, 2015 5:13 am

Pathfinding is powerful but takes a lot out of the cpu. Are there any obstacles sprite a must maneuver around? If not, that it might be better to skip using Pathfinding and use the plugin by rexrainbow called moveto.

http://c2rexplugins.weebly.com/rex_moveto.html
B
42
S
21
G
31
Posts: 685
Reputation: 20,321

Post » Wed Aug 05, 2015 2:08 pm

rekjl wrote:Pathfinding is powerful but takes a lot out of the cpu. Are there any obstacles sprite a must maneuver around? If not, that it might be better to skip using Pathfinding and use the plugin by rexrainbow called moveto.

http://c2rexplugins.weebly.com/rex_moveto.html


Without the plugin this cant be done? i don't have the obstacles problem, i just want my sprite A move around my Sprite B on top in random position, maybe in circles.
B
9
S
3
Posts: 142
Reputation: 1,108

Post » Thu Aug 06, 2015 1:42 am

You can do this without the plugin, but that plugin makes it much easier and we tend to use it quite a lot.

To do this without the plugin, you could use LERP.
https://www.scirra.com/tutorials/378/creating-a-smooth-sliding-effect-with-lerp
B
42
S
21
G
31
Posts: 685
Reputation: 20,321

Post » Thu Aug 06, 2015 3:59 pm

rekjl wrote:You can do this without the plugin, but that plugin makes it much easier and we tend to use it quite a lot.

To do this without the plugin, you could use LERP.
https://www.scirra.com/tutorials/378/creating-a-smooth-sliding-effect-with-lerp


thank you for your advice, i am using rex_moveto and works fine, i hope don't have any disadvantages or perfomance issues using unofficial plugins
B
9
S
3
Posts: 142
Reputation: 1,108

Post » Fri Aug 07, 2015 12:34 am

No worries, rexrainbow's plugins are super useful and if used effectively, it won't affect your performance much.
B
42
S
21
G
31
Posts: 685
Reputation: 20,321


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, dimitriosfl, InfiniteRockets, jkmalau and 15 guests