[PLUGIN] WorkSheet

Post your completed addons to share with the community

Post » Mon Nov 14, 2011 10:28 am

WorkSheet (Update:2013/07/18)

WorkSheet could execute function with parameters at specific time. (It's similar with "timeline" in C1.)
You can use worksheet to describe the flow of creating enemies in tower defense or create a beat game.


To use WorkSheet, you need to install Timeline plugin first.

Here is an example.



The step of start the worksheet are
1. "action: start work sheet", parse a commands string and start to run these commands.

The format of commands string is
a. each line has a command
b. format of command is
[code]time,function name,param0,param1...[/code]
"time" is the elapsed time after "action: start work sheet" (in second).

ex:
1,message,3,Hi
2,message,2,Hello

There are two commands --
when over 1 second after start, call function "message" with param(0)="3" (string) and param(1)="Hi" (string)
when over 2 second after start, call function "message" with param(0)="2" (string) and param(1)="Hello" (string)

Other feature of commands string are
- using "//" at the line head to add a comment.
- WorkSheet will sort commands string by "time"
- You can use excel to create commands string, excepted using "\n" in the cell. The format of commands string is similar with csv.

The commands string can load from external file by AJAX.rexrainbow2013-07-18 04:47:42
B
60
S
13
G
11
Posts: 1,904
Reputation: 14,045

Post » Tue Nov 15, 2011 5:37 am

Rex told me that one example is needed for plugin users,
the Music game below is made for showing how worksheet works.

Press R or B when the symbols drop onto black line.

http://dl.dropbox.com/u/31590694/TapTapC2/index.html

the total symbol spawning pattern is written in a csv file(a format of EXCEL),
looks like:

5,R,2
6,R,1
7,B,3
.......etc

5,6,7 mean the timing we want to create the symbol,
R,B means the function name we want to call, which create Red or Blue symbols in this game,
2,1,3 are the function parameters, which means dropping lines in this game.

You can download our rar file here to see the details, capx included.
Before you open the capx, Rex's "Timeline", "Worksheet" and "Function" is necessary.

http://dl.dropbox.com/u/31590694/TapTapC2.rar
B
44
S
12
G
8
Posts: 144
Reputation: 9,275

Post » Tue Nov 15, 2011 5:54 am

Thanks, gonzdevour.

B
60
S
13
G
11
Posts: 1,904
Reputation: 14,045

Post » Wed Nov 16, 2011 4:10 am

Function plugin had updated. Please remember download it again.
B
60
S
13
G
11
Posts: 1,904
Reputation: 14,045

Post » Thu Nov 17, 2011 6:10 am

Update

Gonzdevour found a bug when re-enter layout.

BTW, remember using "Action: Stop worksheet" when leaving layout.



PS. @Ashley, dose plugin has "onDestroy()" method like in behavior?Kyatric2011-11-17 07:37:03
B
60
S
13
G
11
Posts: 1,904
Reputation: 14,045

Post » Sun Mar 25, 2012 12:57 am

Update:

Add version to 1.0
B
60
S
13
G
11
Posts: 1,904
Reputation: 14,045

Post » Thu May 10, 2012 8:29 pm

I'm using the worksheet to try and add a ramping difficulty to my pattern game, and when I exchange the time-in-seconds for a global variable, it doesn't work... is there a reason for this?

ie.

Worksheet| Start Worksheet: "Difficulty,spawnenemy,0,0"
this is what I need to have work :(
B
53
S
6
G
9
Posts: 265
Reputation: 8,012

Post » Thu May 10, 2012 11:13 pm

@brent_hamel

"Difficulty,spawnenemy,0,0"
uh, do you mean that "Difficulty" is a variable? Sorry, Worksheet currently only accepts number for time parameter.

Or post the capx for more detail.
B
60
S
13
G
11
Posts: 1,904
Reputation: 14,045

Post » Fri May 11, 2012 7:16 am

yes Difficulty is a variable, is there anyway to implement this, it would be an incredibly useful feature :)
B
53
S
6
G
9
Posts: 265
Reputation: 8,012

Post » Fri May 11, 2012 8:27 am

@brent_hamel

There is a parameter named "Offset" in "action:Start work sheet". It means that adding an offset in time. For example,
worksheet string -
[code]5,R,2
6,R,1
7,B,3[/code]
and the offset set to 10.

It will be
- run "R,2" at 5+10 (sec.)
- run "R,1" at 6+10 (sec.)
- run "B,3" at 7+10 (sec.)

Hope it could match your requirement. rexrainbow2012-05-11 08:29:32
B
60
S
13
G
11
Posts: 1,904
Reputation: 14,045

Next

Return to Completed Addons

Who is online

Users browsing this forum: drops and 0 guests