[PLUGIN] WorkSheet

0 favourites
  • 15 posts
From the Asset Store
The I18N (Translation) is a Construct plugin created to translate text in game.
  • 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.

    <img src="http://i1081.photobucket.com/albums/j352/rexrainbow1/screen1-31_zps8fd4d014.png" border="0">

    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,function name,param0,param1...

    "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.

  • 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

  • Thanks, gonzdevour.

  • Function plugin had updated. Please remember download it again.

  • 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?

  • Update:

    Add version to 1.0

  • 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 :(

  • 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.

  • yes Difficulty is a variable, is there anyway to implement this, it would be an incredibly useful feature :)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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 -

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

    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.

  • I should be able to make that work, thanks for the quick response!

  • Update:

    • Now this plugin could use official function to be it's callback.

    Capx

    Note: remember DO NOT use "action:Setup" at "Z: Deprecated" group (shown at action select list in C2 editor) if user want to use official function plugin.

    Actions at ""Z: Deprecated" group are used for rex_function.

  • Update

    • support save/load system
    • user does not need to assign timeline object if there is only one timeline object in the environment. See the capx at first post.
  • Update

    Fix bug, now the delay time will be correct.

  • Sorry, but it isn't working for me:

    gyazo.com/f3268b99b47bd1a9f898d45221066e89.png

    There is one spawn of enemy and it's over. I need to spawn it every 2 seconds.

    What i'm doing wrong?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)