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

Forum Home Forum Home > Construct 2 Development > Plugins for Construct 2
 Post Reply Post Reply
Author
10,389 Rep
Post Options Post Options   Quote rexrainbow Quote  Post ReplyReply Direct Link To This Post Topic: [Behavior] Shell (get inst's expression from uid)
    Posted: 11 May 2012 at 3:29pm
Update:

Remove jQuery call.
Back to Top
10,389 Rep
Post Options Post Options   Quote rexrainbow Quote  Post ReplyReply Direct Link To This Post Posted: 25 Mar 2012 at 12:05am
Update:

Add version to 0.1
Back to Top
10,389 Rep
Post Options Post Options   Quote rexrainbow Quote  Post ReplyReply Direct Link To This Post Posted: 04 Jan 2012 at 4:15pm
Try Sprite Bank. It can save instances' properties, and let you create them.
Back to Top
5,350 Rep
Post Options Post Options   Quote smitchell Quote  Post ReplyReply Direct Link To This Post Posted: 04 Jan 2012 at 4:09pm
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?
Back to Top
10,389 Rep
Post Options Post Options   Quote rexrainbow Quote  Post ReplyReply Direct Link To This Post Posted: 31 Dec 2011 at 4:42am
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.

Edited by rexrainbow - 01 Jan 2012 at 4:08am
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down