[Behavior] Shell (get inst's expression from uid)

Post your completed addons to share with the community

Post » Sat Dec 31, 2011 4:42 am

Shell

Shell behavior is still under development. One of the feature is to get the instance's expression(x,y,width,height,angle...etc), from uid.
Currently, it provides to get these expressions
- x
- y
- width
- height
- angle
- opacity
- visible


Example of getting instance's expression from uid

In example, there are two kinds of sprite -"SpriteA" and "SpriteB". In line2, the global variable "uid" saves the uid of clicked instance of "SpriteB".
Then in expression of "action:append text", it use "SpriteA.shell.X(uid)" -- The SpriteA's shell behavior can get the position x by uid, even the uid is not point to SpriteA.

BTW, expression of shell behavior like "shell.X" actually accepts two parameters. First is uid, second is a default value if the uid doesn't point to any instance.rexrainbow2012-01-01 04:08:32
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Wed Jan 04, 2012 4:09 pm

I really love all your plugins, they make my life 10x easier!!!

One quick question about this one though.

If i want to make a local level editor/map creator what ever you want to call it, is this the plugin to use?

Because i will have to save the x and y locations of each instance dragged on the stage right?
B
29
S
12
G
7
Posts: 740
Reputation: 7,839

Post » Wed Jan 04, 2012 4:15 pm

Try Sprite Bank. It can save instances' properties, and let you create them.
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Sun Mar 25, 2012 12:05 am

Update:

Add version to 0.1
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Fri May 11, 2012 3:29 pm

Update:

Remove jQuery call.
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Thu Mar 06, 2014 11:24 am

Thanks rex you are gem
B
206
S
27
G
13
Posts: 1,834
Reputation: 35,776

Post » Sat Jun 28, 2014 8:29 am

I had made another plugin named rex_uid2prop to get properties by UID without picking instances, it even could get private variable.

@Kyatric
Please help me to remove this rex_shell behavior from plugin list. I might release rex_uid2prop later.
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Sun Jun 29, 2014 5:34 pm

Removed.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791


Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 0 guests