[behavior] rex_bCmdqueue (command queue)

Post your work in progress addons and get feedback

Post » Tue May 27, 2014 10:07 am

@xoros

Okey, I had added this feature into this behavior called "global command handler".
This is a sample capx. See the document for more detail.
B
110
S
28
G
280
Posts: 4,487
Reputation: 156,566

Post » Tue May 27, 2014 10:26 am

In mutli- command queues case,
The firing of command handler is done by "global command handler".
The next question is - which command queue should be poped (get next)? Hah...
B
110
S
28
G
280
Posts: 4,487
Reputation: 156,566

Post » Tue May 27, 2014 12:10 pm

@rexrainbow
May be it will be better to introduce a unique identifier for each queue.

On default the identifier is not specified and it will trigger all objects and instances with that behavior (as it was in the first version).

Set Parameter - make an option: "make queue unique" and it will use UID of the object/instance as an identifier.
Action:next/pop can use object's uid for that speciafic object or use default value for all queues
B
45
S
11
G
4
Posts: 517
Reputation: 7,398

Post » Tue May 27, 2014 2:12 pm

@xoros
It means that a behavior supports multi queue, more complex for operating, I might not try it, even it is a good solution. Another stupid solution is using variable to identify the queues.
B
110
S
28
G
280
Posts: 4,487
Reputation: 156,566

Post » Tue May 27, 2014 2:28 pm

Yes, I think the behavior is already very good as it is. I will be using it a lot.
B
45
S
11
G
4
Posts: 517
Reputation: 7,398

Post » Tue May 27, 2014 3:34 pm

@xoros

Thanks, I think it could cover most of cases. I don't know when to have multi-queues in a sprite instance. Maybe do some actions independent?
B
110
S
28
G
280
Posts: 4,487
Reputation: 156,566

Post » Tue May 27, 2014 3:43 pm

@xoros

I had made another similar behavior named rex_bScenario behavior before. It is based on rex_scenario plugin.
I might release it later. Add more sample capx files.
B
110
S
28
G
280
Posts: 4,487
Reputation: 156,566

Post » Thu Jun 05, 2014 6:11 am

Nice.

I implemented this using an array and ALOT of events before, good work
B
33
S
6
G
7
Posts: 339
Reputation: 7,426

Post » Fri Jun 06, 2014 4:00 am

@Ize

I understand.
Packing function name and parameters into a string, then push into array. And the reverse actions would take a lot of events.
B
110
S
28
G
280
Posts: 4,487
Reputation: 156,566

Post » Fri Jun 06, 2014 6:43 am

@Ize
@xoros

Is it useful to have a plugin which could pack function name and parameters into a json string, and an action to call function by this json string? It could be used to save the function call, run it later.


Edit:

I had made it now, see the document here.
B
110
S
28
G
280
Posts: 4,487
Reputation: 156,566

PreviousNext

Return to Work in Progress Addons

Who is online

Users browsing this forum: No registered users and 0 guests