[Plugin] Extra Expressions

Post your completed addons to share with the community

Post » Wed Jan 11, 2012 12:31 am

I think the devs overlooked this one when they added the tokenXXX expressions...

How about adding this oversighted findToken expression for finding which position a token is at if it is in the list. 0 is a valid position doing things the C2 way so -1 may need to be used as the "not found" result.

eg 1: findToken("catacombs,cat,catastrophic,triplicate","cat",",") should yield 1

eg 1: findToken("catacombs,cat,catastrophic,triplicate","ata",",") should yield -1
GauVeldt2012-01-11 00:34:04
B
28
S
5
G
1
Posts: 30
Reputation: 1,889

Post » Wed Jan 11, 2012 3:56 pm

Added the findToken expression.

Parameters:
text - str - text to tokenize
token - str - token to find
delimiter - str - delimiter to split text by
case sensitivity - int - case insensitive (0), case sensitive (1)
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Thu Jan 12, 2012 12:27 pm

I dont know if its possible but could You add "collision at offset", would be perfect for my project :D
B
5
S
1
G
2
Posts: 70
Reputation: 1,140

Post » Thu Jan 12, 2012 1:38 pm

That one is kind of complex and can be done with invisible sprites, so-called "detectors", so kind of redundant.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Fri Jan 13, 2012 12:03 pm

You're right. Maybe an "Else" condition? (probably its very hard too), or "if not colliding" with sth or anything. (im just asking, not making any pressure or something)
B
5
S
1
G
2
Posts: 70
Reputation: 1,140

Post » Fri Jan 13, 2012 12:10 pm

I believe you can invert conditions to that effect.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Fri Jan 13, 2012 1:03 pm

not the collision, in the latest version inverting collision is not possible (blank).
B
5
S
1
G
2
Posts: 70
Reputation: 1,140

Post » Fri Jan 13, 2012 1:15 pm

@TheBricktop: You can't invert triggers (so no inversion for "on collision") but you can invert "is overlapping".
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,999
Reputation: 57,793

Post » Fri Jan 13, 2012 2:01 pm

@TheBricktop

Post from Ashley HERE on the same subject.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,844
Reputation: 48,289

Post » Sat Jan 14, 2012 12:27 am

Oh, sorry for bothering. Seem to me that i have similar problem as the guy in that thread. I will try to make workaround.
B
5
S
1
G
2
Posts: 70
Reputation: 1,140

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: DragoMej and 0 guests