Pinning/mirror problems, foreach instances

Get help using Construct 2

Post » Tue Dec 08, 2015 1:40 pm

I have an enemy that I want to pin a tail on. I'm trying to use foreach to pin the closest tail to it's nearest body. Here's an example:
https://www.dropbox.com/s/3yhnxonn86s2y0b/weez.capx?dl=0

As you see, that isn't working, only one of them is pinning properly. Secondly, I'd like to pin the tail to the tail image point on the body, but I'm not sure how and I can't find the plugin download that allows pin to image point, if that is even needed anymore.

Thirdly, mirroring isn't working on the pinned tail, when the body and tail are mirrored, the tail stays at it's initially pinned position. Any ideas what I'm doing wrong on these three acounts?
B
41
S
12
G
14
Posts: 1,122
Reputation: 11,282

Post » Tue Dec 08, 2015 2:07 pm

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 4:56 pm

Thanks so much! So, how does it work for multiple enemies, just it automatically assign the multiple tails to the body? Is the setposition expression more beneficial than using the Pin for certain applications such as this?
B
41
S
12
G
14
Posts: 1,122
Reputation: 11,282

Post » Tue Dec 08, 2015 5:02 pm

Sorry, wrong thread :oops:
B
41
S
12
G
14
Posts: 1,122
Reputation: 11,282

Post » Tue Dec 08, 2015 11:29 pm

Tried combining the container approach with this, and now the tail is offset and kinda moves slightly delayed? https://www.dropbox.com/s/o2yns4czyguw2 ... .capx?dl=0
B
41
S
12
G
14
Posts: 1,122
Reputation: 11,282

Post » Wed Dec 09, 2015 1:01 am

Zebbi wrote:Tried combining the container approach with this, and now the tail is offset and kinda moves slightly delayed? https://www.dropbox.com/s/o2yns4czyguw2 ... .capx?dl=0


There isn't a container, only an object called container..

Besides that I guess the issue is now that events are read top to bottom and the tail is set to the imagepoint before other events move your weasel..
so it is actually always one tick behind in movement..
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 Dec 09, 2015 6:26 am

LittleStain wrote:
Zebbi wrote:Tried combining the container approach with this, and now the tail is offset and kinda moves slightly delayed? https://www.dropbox.com/s/o2yns4czyguw2 ... .capx?dl=0


There isn't a container, only an object called container..

Besides that I guess the issue is now that events are read top to bottom and the tail is set to the imagepoint before other events move your weasel..
so it is actually always one tick behind in movement..


Sorry, I had it on my in-game version but forgot to add to this example. I've reuploaded, moved the events and added the container but the tail is still offset? Really appreciate your help so far! :D https://www.dropbox.com/s/ngqbuxtfpfuor ... .capx?dl=0
B
41
S
12
G
14
Posts: 1,122
Reputation: 11,282

Post » Wed Dec 09, 2015 10:25 am

In this kind of cases, it is due to the fact that the object you are moving is not the weasel but its collision box.
That's where the offset is coming from, pin actually do the positioning of the object after the events are read.

To fix, the best would be to actually position the tail depending on an imagepoint on the collision box itself, not the animation/weasel.
Or to have the weasel moving/being positioned manually every tick like the tail is.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
296
S
119
G
96
Posts: 7,332
Reputation: 71,306

Post » Wed Dec 09, 2015 3:24 pm

Thanks for the suggestion, it works now by pinning to the container: https://www.dropbox.com/s/b5ph31o3xnh9t ... .capx?dl=0

So, how come the pin works properly when ordered like this?
B
41
S
12
G
14
Posts: 1,122
Reputation: 11,282

Post » Wed Dec 09, 2015 3:33 pm

Okay, here's the final trouble with this weasel, I have the angles sorted out nicely for the actual body, but the tail is wanging off at a funny kank for some reason, is the orientation of the tails angle defined by some coordinate I'm not aware of? Here: https://www.dropbox.com/s/nmj4ayeylsiv4 ... .capx?dl=0
B
41
S
12
G
14
Posts: 1,122
Reputation: 11,282

Next

Return to How do I....?

Who is online

Users browsing this forum: JaredX and 21 guests