How do I rotate sprite without affecting collision box?

Get help using Construct 2

Post » Tue Dec 08, 2015 5:13 pm

Also, what happens about, say, mirroring the animations when the collision changes direction? Does the engine know which enemy animation to mirror?

Here's the problem I'm having: https://www.dropbox.com/s/wuz5t8ixdgq6dle/fraug2.capx?dl=0
B
41
S
12
G
14
Posts: 1,122
Reputation: 11,268

Post » Tue Dec 08, 2015 5:20 pm

Zebbi wrote:Also, what happens about, say, mirroring the animations when the collision changes direction? Does the engine know which enemy animation to mirror?

Here's the problem I'm having: https://www.dropbox.com/s/wuz5t8ixdgq6dle/fraug2.capx?dl=0


Add the frog and the frogcontainer to a container and it works..

At the moment you aren't telling the program which frogcontainer belongs to which frog..

Look at

How events work

and specifically the unreferenced objects part of that page..

Using a container is one way to automatically pick the right object, other ways would be giving one of them a variable set to the uid of the other, or things like pick nearest as you tried before..
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 » Tue Dec 08, 2015 5:28 pm

I've not used containers before, sorry if I seem a little helpless! Is it possible, using the example I've given, to convert the enemy animations and containers to a container so this works? So far, my main character is just pinned to it's container, and that was how I was doing this.

EDIT: Creating a container
To add an object to a container, select one of the objects you want in the container and click the Create link in its properties (which appears under the Container category next to the label No container). A dialog opens allowing you to choose the object to add to the container.

Seems to work!
Last edited by Zebbi on Tue Dec 08, 2015 5:34 pm, edited 1 time in total.
B
41
S
12
G
14
Posts: 1,122
Reputation: 11,268

Post » Tue Dec 08, 2015 5:32 pm

Like I said add container and it works...

right click either the frog or the frogcontainer, go to the properties bar and underneath effect you find container..
Add to container and select the other object..
Ready!!

You could have also found this in the manual

(BTW: the reason I often link to the manual is because many people don't read it and it's actually quite usefull when you want to know how things work)
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 » Tue Dec 08, 2015 5:35 pm

Zebbi wrote:So far, my main character is just pinned to it's container, and that was how I was doing this.


Problem is, you didn't reference/pick any object in your action/event so they weren't always pinned to the right one..
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 » Tue Dec 08, 2015 5:57 pm

Thanks so much for the advice, works perfect now!
B
41
S
12
G
14
Posts: 1,122
Reputation: 11,268

Post » Tue Dec 08, 2015 9:03 pm

The container is a good catch. I think this will sove your problems. Let us know.
B
14
S
6
G
1
Posts: 48
Reputation: 1,269

Post » Tue Dec 08, 2015 9:20 pm

Zebbi wrote:Thanks so much for the advice, works perfect now!

:D
B
41
S
12
G
14
Posts: 1,122
Reputation: 11,268

Previous

Return to How do I....?

Who is online

Users browsing this forum: sean080 and 28 guests