[Behavior] Pin+

Post your completed addons to share with the community

Post » Thu Apr 06, 2017 1:32 am

Pin+

Works just like the pin behavior, but has more features.
You can pin other properties besides the default;

position/angle,
width/height, (w/h size, w/h size relative, x/y scale, x/y scale relative)
zindex/layer,
opacity,
visibility,
collisionEnabled,
timescale,
hotspotX/hotspotY,
imagepoint,
animation,
frame,
mirror,
flip,
destroy

There are also expressions to receive the states of each, as well as actions to set them. You can also have them preset in the properties window.

When you pin an object, it will ask for a mode, such as position only/position and angle, etc. It will only reposition if you have the x,y property enabled and only set angle if the angle property enabled.

download link:
r8 (new): https://1drv.ms/u/s!AhHSZHEulqh_gg2mU5cKBvCFdUKo
r7 (old): https://1drv.ms/u/s!AhHSZHEulqh_ggeYd6-9HIeFgikN

edit: here's a simple capx example
https://1drv.ms/u/s!AhHSZHEulqh_gX4lAkddZ560rWic
Last edited by Prominent on Sat Sep 23, 2017 7:30 pm, edited 11 times in total.
B
45
S
21
G
65
Posts: 1,118
Reputation: 38,227

Post » Thu Apr 06, 2017 4:56 am

Image
Image Image Image
B
43
S
22
G
15
Posts: 379
Reputation: 12,254

Post » Mon Apr 10, 2017 8:09 pm

Is there "pin to hotspot" meant to pin the object to the other's origin point? Any chance you could add a "pin to image point" option to enter a number of the image point you wish to pin to?

thx

great work!
B
87
S
44
G
16
Posts: 1,005
Reputation: 17,938

Post » Mon Apr 10, 2017 9:07 pm

@justifun , That's a good idea- I'll have to look into that and see what can be done.
B
45
S
21
G
65
Posts: 1,118
Reputation: 38,227

Post » Mon Apr 10, 2017 9:51 pm

justifun wrote:Is there "pin to hotspot" meant to pin the object to the other's origin point? Any chance you could add a "pin to image point" option to enter a number of the image point you wish to pin to?

thx

great work!


Rex has a pin to image point plugin that you can use for that

Image

@Prominent But very nice plugin and a great addition to C2 :) Keep up the great work!
B
55
S
24
G
13
Posts: 767
Reputation: 12,575

Post » Tue Apr 11, 2017 10:52 am

(attached myself to this topic to follow updates, sorry 2 disturb)
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Wed Apr 12, 2017 7:53 pm

Thanks!
@justifun , I uploaded new version that includes ability to specify the imagepoint. Also added "Enabled 2" option to the x,y, angle properties if you want to disregard initial distances/angle offsets.
B
45
S
21
G
65
Posts: 1,118
Reputation: 38,227

Post » Wed Apr 12, 2017 8:03 pm

uploaded fixed version..
B
45
S
21
G
65
Posts: 1,118
Reputation: 38,227

Post » Sun Apr 16, 2017 3:20 pm

Awesome ! Thanks!
B
87
S
44
G
16
Posts: 1,005
Reputation: 17,938

Post » Sat Apr 22, 2017 7:10 pm

Updated behavior: You can now pin Animation and Frame.
This is useful if for instance you want a character to have different clothing- you can set the clothing to have same animation name as the base sprite, and when the base animation changes, the clothing will also change to the same animation.
You can also set the Frame to be pinned as well- so the pinned object will always have same frame number as the object it is pinned to.
B
45
S
21
G
65
Posts: 1,118
Reputation: 38,227

Next

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 1 guest