[PLUGIN] rex_Function2

Post your completed addons to share with the community

Post » Sun Sep 23, 2012 6:56 am

Ok, thanks rexrainbow. I'm glad it was the touchmouse plugin. That makes it much easier to fix my game. I got to start paying more attention to the plugin forums before I start a new game project. It's just that you make (so many) great plugins for lazy people like me that its hard to keep track of them all Wink2012-09-23 07:04:14
B
50
S
11
G
8
Posts: 479
Reputation: 9,911

Post » Mon Nov 05, 2012 8:06 pm

With the C2 bug fix a few versions back in terms of picking newly created objects, I've noticed it changed how functions work a little.

It seems that because of the decleration of the function itself, I can never reach the top level event when I create an object.



Based on this post by R0J0hound, I would need to hit the top level event to get access to the newly created objects, or move the pick to a sub-event. It seems though that because I can't get access to the top level event (since I'm always inside the function) that the plugin can never create and get access to an object in the same call.

Is this correct and just a limitation of the plugin, or am I using it wrong? boolean2012-11-05 22:55:25
B
24
S
4
G
1
Posts: 244
Reputation: 3,462

Post » Mon Nov 05, 2012 10:47 pm

@boolean

Function plugin does not change SOL, it will be changed by C2 engine.
Function plugin only trigger "on function" event and passing parameters then receiving returns back.

To pick all new created instances, I would use "wait 0.02" to wait engine tick to next frame. It is not a smart solution, I know.rexrainbow2012-11-05 22:52:16
B
97
S
22
G
178
Posts: 4,118
Reputation: 104,043

Post » Mon Nov 05, 2012 11:00 pm

Ah brilliant, that fixed it. Thanks mate!
B
24
S
4
G
1
Posts: 244
Reputation: 3,462

Post » Mon Nov 05, 2012 11:02 pm

@boolean

Ha, "action:wait 0.02" might create some new bugs since some actions does not be done at the same tick, be careful.
B
97
S
22
G
178
Posts: 4,118
Reputation: 104,043

Post » Mon Nov 05, 2012 11:56 pm

I'm trying to use it sparingly. I've already found if you put it inside a loop C2 loses track of the 'loopindex' variable and crashes

I think there is only one or two spots I need it in, so it should be ok.boolean2012-11-05 23:56:35
B
24
S
4
G
1
Posts: 244
Reputation: 3,462

Post » Thu Nov 08, 2012 11:30 pm

r109 has an official function plugin, so my function could be retired.
I might redesign some plugins connecting with my function object like "timeline", "worksheet", "timer", and "scenario" to be able to connect with official function object.
B
97
S
22
G
178
Posts: 4,118
Reputation: 104,043

Post » Fri Nov 09, 2012 2:05 am

I may be migrating to the official Function plugin with my new game, but your Function plugin has served me well for my just recently finished game. Props to you, good sir!
B
58
S
20
G
7
Posts: 305
Reputation: 8,804

Post » Fri Nov 09, 2012 4:46 pm

ty
B
12
S
3
G
1
Posts: 10
Reputation: 792

Post » Sat Nov 10, 2012 4:38 pm

Can I request you don't bury this just yet? I raised some issues over in this thread that the official plugin has some shortcomings compared to this plugin. I know I'll be using this plugin for the foreseeable future boolean2012-11-10 16:39:11
B
24
S
4
G
1
Posts: 244
Reputation: 3,462

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 1 guest