[PLUGIN] WorkSheetForum Home > Construct 2 Development > Plugins for Construct 2
|Post Reply||Page 12>|
Topic: [PLUGIN] WorkSheet
Posted: 14 Nov 2011 at 10:28am
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
"time" is the elapsed time after "action: start work sheet" (in second).
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.
Edited by rexrainbow - 28 Apr 2013 at 4:37am
|Post Options Quote Reply Posted: 15 Nov 2011 at 5:37am|
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.
the total symbol spawning pattern is written in a csv file(a format of EXCEL),
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.
|Post Options Quote Reply Posted: 15 Nov 2011 at 5:54am|
|Post Options Quote Reply Posted: 16 Nov 2011 at 4:10am|
Function plugin had updated. Please remember download it again.
|Post Options Quote Reply Posted: 17 Nov 2011 at 6:10am|
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?
Edited by Kyatric - 17 Nov 2011 at 7:37am
|Post Options Quote Reply Posted: 25 Mar 2012 at 12:57am|
Add version to 1.0
|Post Options Quote Reply Posted: 10 May 2012 at 8:29pm|
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?
Worksheet| Start Worksheet: "Difficulty,spawnenemy,0,0"
this is what I need to have work :(
|Post Options Quote Reply Posted: 10 May 2012 at 11:13pm|
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.
|Post Options Quote Reply Posted: 11 May 2012 at 7:16am|
yes Difficulty is a variable, is there anyway to implement this, it would be an incredibly useful feature :)
|Post Options Quote Reply Posted: 11 May 2012 at 8:27am|
There is a parameter named "Offset" in "action:Start work sheet". It means that adding an offset in time. For example,
worksheet string -
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.
Edited by rexrainbow - 11 May 2012 at 8:29am
|Post Reply||Page 12>|
|Forum Jump||Forum Permissions
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum