Hey there peoples of the COG forum, I come to you today, out from under the box fort o'er there in the corner (a box fort because moving is fun (read: ow, my back.) and because I have yet to find a rock big enough that I could live under without being rendered a pancake) to present you with (what I hope will be) a handy tool:
CS Auto Advance and Timed Choice mod
What is this obnoxiously named and boldly titled thing you refer to above you ask?
It's a mod I've developed over the past couple of days that lets you create psuedo-cinematic sequences in CS (much like ones you see in Visual Novels, y'know, where the text auto advances without user input (i.e. a mouseclick)) and create choices with a sense of urgency and dilemma, if you've ever played one of EA's attempts at a Visual Novel style game on the app store (most notably Cause of Death) you know exactly what I mean, or even if you've played or seen gameplay of pretty much any Telltale Games game in the past few years, you've seen that kind of mechanic in action.
So now that that's explained, let's get on to an even more obnoxiously titled section of this post that'll show ya' how to work this thing, the section being:
Malebranche's Mod Manual
(don't say I didn't warn ya')
Installation: installation of this mod is much, much simpler than the installation of my previous mod, mainly due to me being somewhat less scrubby at JS than I used ta' be but that's another story, so, to install, simply download the autoAdvance.js file and throw it into your "web" folder in your CS files, then go and edit the index.html file in your "mygame" folder, all y'need to do is copy this line here:
< script src="../autoAdvance.js">< /script>
and paste it right under the line that looks like this:
< script src="../scene.js">< /script>
of course, make sure to take out the blank spaces between the "<"'s above or otherwise it won't work.
And like that, you've installed the mod.
[Note: Everything beyond this point is depreciated, from here on out, one should refer to this post in the thread for the mod manual for autoAdvance V.2.0]
Usage: Alrighty, now we've finally gotten t'the juicy part, let's start. Everything begins and hinges on one simple command, *auto. The *auto command has 4 parameters/arguments that all need to be listed, they are:
seconds togglehide togglecounter countercolor
(Did I forget to mention that this mod comes with a visual, albeit simple looking, (it was certainly wasn't simple to code the math logic, my brain still smarts (ha ha, get it? Smarts? Brain? ahah... ha... I'll uh... I'll show myself out now))) JS animated countdown timer?)
These 4 parameters/arguments correspond to 4 things,
secondscorresponds to how long you want the mod to take before it triggers the next button and expects a simple number as it's value (i.e. 102 or 50),
togglehidecorresponds to whether you want the next button to show up or not (this doesn't trigger for anything that isn't a
*page_break) and expects either a string of either "hide" or "show",
togglecountercorresponds to whether you want the countdown timer to show up on the page or not and expects a string of either "on" or "off", and finally
countercolorcorresponds to the countdown timer's color and expects a string of the color you want's hexcolor code.
So a normal auto command would look something like this:
*auto 10 "hide" "off" "#fff"(even though we have the counter set to "off" we still need include the countercolor parameter/argument since the mod expects all four parameters/arguments to have a value, will be fixed later on).
Autoadvance sans the counter, with next button hidden:
*auto 10 "hide" "off" "#fff"
Autoadvance sans the counter, with next button shown:
*auto 10 "show" "off" "#fff"
Autoadvance with counter, with next button hidden:
*auto 10 "hide" "on" "#cc0000"
Autoadvance with counter, with next button shown:
*auto 20 "show" "on" "#cc0000"
Autoadvance with counter, on choice:
*auto 20 "show" "on" "#cc0000"
Notes: There is no maximum amount of seconds, there is however a minimum of 1 second. This code should be compatible IE 7 and up but I can't be sure, at the very least it's widely compatible.
And that's that, hope you can find this thing at the very least no less than serviceable in your own games, I know I'm going to be using it a good bit. If there are any errors or if you have any cool suggestions (within reason) that pop up, do feel free to post them here or send me a PM, and I'll do my best to fix and improve things. Enjoy!