[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:
r7: 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 Fri Apr 28, 2017 7:05 pm, edited 10 times in total.
B
41
S
19
G
65
Posts: 1,085
Reputation: 37,842

Post » Thu Apr 06, 2017 4:56 am

Image
Image Image Image
B
42
S
22
G
15
Posts: 372
Reputation: 12,215

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
83
S
40
G
15
Posts: 987
Reputation: 16,847

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
41
S
19
G
65
Posts: 1,085
Reputation: 37,842

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
52
S
22
G
12
Posts: 725
Reputation: 11,716

Post » Tue Apr 11, 2017 10:52 am

(attached myself to this topic to follow updates, sorry 2 disturb)
B
33
S
18
G
27
Posts: 2,450
Reputation: 20,364

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
41
S
19
G
65
Posts: 1,085
Reputation: 37,842

Post » Wed Apr 12, 2017 8:03 pm

uploaded fixed version..
B
41
S
19
G
65
Posts: 1,085
Reputation: 37,842

Post » Sun Apr 16, 2017 3:20 pm

Awesome ! Thanks!
B
83
S
40
G
15
Posts: 987
Reputation: 16,847

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
41
S
19
G
65
Posts: 1,085
Reputation: 37,842

Next

Return to Completed Addons

Who is online

Users browsing this forum: Demkamen and 5 guests