jQuery Quicktime Event

Everybody knows the quicktime events in current games (i.e. the God of War series), where you have to smash buttons at display.

So here’s my attempt to recreate this in jQuery.
This is an early early version, so if you have any suggestions or fixed, I appreciate.

What is it for?

I think it can be used as a nice gaming feature in a browser game, since these games are kind of popular lately.

Another way to use it, like you can see on the example page, could be as a kind of spambot protection.

How to use?

Include both .css and .js files from the archive to your html-head like this:

<link media="screen" rel="stylesheet" href="qtevent.css" type="text/css" />
<script type="text/javascript" src="qtevent.js"></script>

Here’s a sample code:

$("#id_of_target").qtevent({
when: "mouseover",
tries: 2,
success: function() { alert("Yay!"); },
fail: function() { alert("Nope... not"); }
});

This sample activates the event when moving the mouse pointer over the id named “id_of_target”. You have 2 tries to press the right key.

Example Page

Take a look at the examples

Download

http://coding.mypoo.de/wp-content/plugins/downloads-manager/img/icons/default.gif download: jQuery Quicktime Event v0.2 (2.55KB)
added: 31/03/2010
clicks: 220
description: Version 0.2

Version History

  • Version 0.1 (initial release)
  • Version 0.2 (31.03.2010)
    • Added “when” option: jQuery-event on when the quicktime event should start (default: click)
    • Added “tries” option: how many times you are able to guess the key (default: 1)

Tested with

Further Links

jQuery Plugin Page

  • #1 geschrieben von svenCormac
    vor 2 Jahren

    nice idea, i’ll have a look

Comment spam protected by SpamBam

Bisher keine Trackbacks.