rotate around an object? 8 direction behavior path??

Get help using Construct 2

Post » Wed Jul 15, 2015 9:27 pm

I thought it'd be neat to make an RTS style game and one of the ways I'd manage "units" would be to have them rotate or walk in a circle around the node that spawned them. basically, a unit is spawned and then begins to walk in a circle around the spawn point until given orders.

Is there an easy way to set an object with the 8 directional behavior to rotate around an object oncreated?
B
4
Posts: 22
Reputation: 244

Post » Thu Jul 16, 2015 2:52 am

Well, I'm not sure 8 direction behavior would be the easiest way to achieve this with. Is there a reason for 8 direction?

I would probably try to do this with either the Pin behavior, making the sprites simply orbit the node without any particular behavior, or you can try out tanoshimi's Boids flocking behavior for an easy life hack :D
B
50
S
23
G
17
Posts: 291
Reputation: 12,432

Post » Thu Jul 16, 2015 6:40 pm

Message: Rollendice is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
Sup with that? wrote:Well, I'm not sure 8 direction behavior would be the easiest way to achieve this with. Is there a reason for 8 direction?

I would probably try to do this with either the Pin behavior, making the sprites simply orbit the node without any particular behavior, or you can try out tanoshimi's for an easy life hack :D


The reason I chose 8 directional is because the rotational behavior is only meant to be temporary. So, the units are created and rotate only as a visual behavior but when they are given orders they stop rotating and move towards the commanded checkpoint using 8 directional movement. If they should park on a new node, I wanted them to rotate again though..
B
4
Posts: 22
Reputation: 244

Post » Thu Jul 16, 2015 7:33 pm

Oh, I assumed that the nodes themselves would be objects that do the moving, while the units simply trail along. I was thinking to have the unit use Pin behavior to stick to a node, then while node is stationary have it slowly rotate, thus making the unit orbit around it. When a node moves, unpin the unit and have it move after the node, then re-pin once its within a small distance of the node. Though, I would probably use Bullet behavior to achieve this (and Pathfinding behavior if there's any pathfinding required).
B
50
S
23
G
17
Posts: 291
Reputation: 12,432

Post » Thu Jul 16, 2015 8:54 pm

B
21
S
8
G
6
Posts: 177
Reputation: 8,134


Return to How do I....?

Who is online

Users browsing this forum: David181, nahima, Shenkai the ssj and 21 guests