[PLUGIN] rex_Function2

Post your completed addons to share with the community

Post » Tue Apr 03, 2012 2:22 pm

OK, I did even more investigation. This has nothing to do with the functions, it has to do with how the Destroy action works and what happens to the SOL.

I opened another thread here, you can ignore my previous post. The same thing happens even without functions.

Thanks again!
B
14
S
5
G
7
Posts: 235
Reputation: 5,175

Post » Wed Apr 11, 2012 2:11 pm

Alright, let's go with implementing "No triggered function" for now. For all we know, putting a function inside a function may not even be necessary. It was structured that way in Classic probably because putting an else as a non-sub-event caused an error in this case for no apparent reason.
B
94
S
37
G
11
Posts: 404
Reputation: 11,275

Post » Mon Apr 23, 2012 4:28 pm

I don't know why this isn't standard functionality, but your plugin literally revolutionized the way I approached designing games with C2. Your plugins really are amazing for productivity, but your function plugin is the crown jewel of that fine collection.
B
7
Posts: 13
Reputation: 855

Post » Mon Apr 23, 2012 11:12 pm

@mrabear

Ashely will make official "function" feature in the future.
B
97
S
22
G
176
Posts: 4,109
Reputation: 103,021

Post » Tue May 08, 2012 6:47 am

Great work Rex, love the function feature - I'll be using it for just about every project from here onwards.

I was just wondering, is there a function that allows you to pass objects/sprites to it? I seem to have to copy & paste quite a bit when I need to apply the same rule types to different object/sprites.
B
34
S
8
G
3
Posts: 328
Reputation: 7,692

Post » Tue May 08, 2012 6:55 am

@EyeHawk

You might need use "families" feature. It is available in standard version.rexrainbow2012-05-08 06:58:08
B
97
S
22
G
176
Posts: 4,109
Reputation: 103,021

Post » Tue May 08, 2012 9:17 am

Hi Rex, thanks actually that answered another question I had.

In my original case though, I have two sets of rules like so:



Both rules are identical, but the objects involved are different.

It would be cool if I could turn the actions into a function, and then pass it either [TomatoBlock & TomatoCross] OR [PotBlock & PotCross].

I can't use families in this case as the tomato actions would affect the pot objects and vice versa.

I don't suppose there's a plugin that does this?EyeHawk2012-05-08 09:19:26
B
34
S
8
G
3
Posts: 328
Reputation: 7,692

Post » Tue May 08, 2012 10:42 am

@EyeHawk

"I can't use families in this case as the tomato actions would affect the pot objects and vice versa."

You might use a private variable in these sprite instances to indicate which sprite type belonged.
Or put function name in private variable as it's handler name, so that you could change handler dynamically.
B
97
S
22
G
176
Posts: 4,109
Reputation: 103,021

Post » Tue May 08, 2012 10:50 am

Aha, I think that may do the trick! I'll use the private variable technique. Thanks again Rex
B
34
S
8
G
3
Posts: 328
Reputation: 7,692

Post » Fri May 11, 2012 3:26 pm

Update:

Remove jQuery call. Hope it could be run at new exporter.
B
97
S
22
G
176
Posts: 4,109
Reputation: 103,021

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: dark1994 and 1 guest