How do I adjust angle regarding other object?

Get help using Construct 2

Post » Thu Mar 26, 2015 2:02 am

Hi!

This is not exactly as the title says but comes close.
I have an object that creates another object when it hits a solid. What I want is the new object to have the same angle set (when created) that the father object has. how do I do that?
B
5
Posts: 92
Reputation: 459

Post » Thu Mar 26, 2015 2:36 am

New objects spawned from another object usually inherit the position and angle from the spawning object,

Just in case, you can Sprite->SetAngle to Parent.Angle right after you create it.
B
14
S
5
G
1
Posts: 189
Reputation: 1,536

Post » Thu Mar 26, 2015 5:25 am

Thanks!
yes, it spawned in the same direction.
Just to know: Couldn't find how to use the second option you mentioned. can't find a way to refer to a parent object. Is it through expressions? when i am writing an expression it never suggests the word "parent".
B
5
Posts: 92
Reputation: 459

Post » Thu Mar 26, 2015 6:36 am

Construct2 does not keep track of which object spawned which other object. If you want that information, you can store it yourself in an instance variable right after you spawn the second object.
B
14
S
5
G
1
Posts: 189
Reputation: 1,536


Return to How do I....?

Who is online

Users browsing this forum: dokthor, maldrok, zenox98 and 13 guests