Object orbiting another object issues

Get help using Construct 2

Post » Wed Aug 14, 2013 8:10 am

So, I was able to get my object to orbit another object, no issues there!

In case anyone was wondering how to do that, there's a great example here:
http://www.scirra.com/forum/how-do-i-make-earth-rotate-around-the-sun_topic45633.html

Which I was able to use.

However, I don't want the object to be there from the start. I want it to be able to be created, after the player picks up a power up, equips it and then hits the P button. I'm hoping then I can then get the player to spawn the object and have it rotate around it.

Does anyone know how to do this, or have an example of it?

Thanks guys!
B
4
Posts: 78
Reputation: 606

Post » Wed Aug 14, 2013 8:23 am

Should be pretty easy.

Spawn an object at the correct distance from the player and set it's events to the orbit events.
But I guess it's harder than that, because you put your question here.

Could you post a capx, so I (we) could take a look?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Aug 14, 2013 8:35 am

the capx itself is huge and ridiculously confusing even for me. But the only portion that the object is in is this part:

B
4
Posts: 78
Reputation: 606

Post » Wed Aug 14, 2013 8:36 am

And thanks again!
B
4
Posts: 78
Reputation: 606

Post » Wed Aug 14, 2013 8:36 am

And actually the "on created" part doesn't work, as it needs to be "every tick" for the axe to rotate. So that's been changed now. But the axe still doesn't spawn properly
B
4
Posts: 78
Reputation: 606

Post » Wed Aug 14, 2013 8:41 am

What is the problem with the spawning? I would use on p released instead of pressed (or a trigger once), but see no further issues.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Aug 14, 2013 8:48 am

Currently, when the layout starts the axe is already spinning around him, despite the conditions on it, and the axe being no where near the player on the screen at the time but of course there needs to be one in the layout for it be able to be spawned.
B
4
Posts: 78
Reputation: 606

Post » Wed Aug 14, 2013 8:51 am

So as of right now, the issue is that when the layout starts, I don't want the axe to be there, until the player hits P and then spawn the axe, but currently the axe is already there, and hitting P does nothing.
B
4
Posts: 78
Reputation: 606

Post » Wed Aug 14, 2013 8:51 am

on start of layout - axe destroy.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Aug 14, 2013 8:54 am

Haha well... that was easy, sorry to waste your time! I must be entirely too tired to be doing this right now. Thanks again!
B
4
Posts: 78
Reputation: 606

Next

Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, dand, tinhofiel and 27 guests