[Plugin] Extra Expressions

Post your completed addons to share with the community

Post » Sun Oct 30, 2011 5:41 pm

Here is my very first plugin for Construct 2! *drum rolls*

Extra Expressions
Version: 1.1 (11th January)

Download ExtraExps.zip
To install, extract the contents to Construct 2\exporters\html5\plugins folder.
To use, simply start entering an expression where applicable, like this:
[code]ExtraExpressions.char2code("A")[/code]
Tip: You can rename the object to a suitable shorthand, such as ExtExp

The plugin contains miscelaneous expressions that complement the system expressions. It is kind of pointless to create a plugin for each expression, so I decided to create Extra Expressions plugin containing all regularly used expressions.

LIST OF EXPRESSIONS

find(text, source) - Case sensitive version of system find expression. Find text within source text.
char2code(char) - Returns the charcode of a character (or the first character of string)
code2char(code) - Returns the character from charcode
cosp(a,b,t) - Cosine interpolation between points a and b
--- NEW ---
offsetX(x,angle,distance) - Returns the x position at an offset by distance at angle.
offsetY(y,angle,distance) - Returns the y position at an offset by distance at angle.
snap(number,gridsize) - Returns the number snapped to grid size (e.g. 25.5 snapped to 16 returns 32).
encode(string) - Encode the string to Base64
decode(base64) - Decode the encoded string from Base64
findToken(text,token,delimiter,case sensitivity (0 or 1)) - Find token in text, returns its index if found or -1 if not found.

---
Yeah, just a few expressions for now, but be sure that I will be adding more. Got any suggestions? Better terminology? Drop a line here!Mipey2012-01-11 15:55:03
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Tue Nov 01, 2011 6:00 pm

Must have missed this post

Many thanks. These will be useful :)
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,839
Reputation: 48,279

Post » Wed Nov 02, 2011 11:13 am

Nice plug-in! I think it will be very useful.
Don't see the fnords and they won't eat you!
B
75
S
16
G
12
Posts: 322
Reputation: 11,608

Post » Mon Nov 07, 2011 12:01 pm

I liked it.
B
202
S
37
G
13
Posts: 136
Reputation: 29,488

Post » Tue Nov 08, 2011 11:45 am

Oooh, Snap will be useful!
B
28
S
7
G
7
Posts: 102
Reputation: 6,483

Post » Sun Nov 13, 2011 3:45 pm

Pretty great idea..thanks Mipey
B
159
S
38
G
11
Posts: 229
Reputation: 17,361

Post » Thu Nov 24, 2011 2:16 pm

Suggestion.
I don't know how hard it would be, and I'm guessing Scirra will introduce this some time in the future themselves. But I'm currently killing myself setting up level(layout) changing by having to make an event list of every single level available in a game bound to a variable's specific value for example, instead of a changing the level by expression.
Long story short: "Go to layout by expression".
Now, I guess it's technically an action, but an expression-dependent action so it might be a good addition to the Extra Expressions plugin.
For your consideration, thanks!McKack2011-11-24 18:48:11
B
88
S
33
G
7
Posts: 31
Reputation: 8,425

Post » Fri Dec 09, 2011 11:05 pm

Update!

I've added encode and decode expressions for Base64 string encoding/decoding. Base64 is a highly useful encryption method that prepares data for sending over HTTP protocol. It also has other uses, such as obfuscation.Mipey2011-12-09 23:06:04
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Fri Dec 09, 2011 11:11 pm

cool, certainly gonna try this out!
ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028

Post » Sat Dec 10, 2011 10:37 am

Oops, forgot to sync the dropbox folder. Should be available now.

Note to self: don't work past midnight. And don't feed the gremlins any meat.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Next

Return to Completed Addons

Who is online

Users browsing this forum: EpicPixel and 1 guest