-
Notifications
You must be signed in to change notification settings - Fork 0
QTE's creation
Quick Time Events, or QTE, are a way to limit players' actions. Usually, a QTE consists in a series of keys that the user has to press in the correct order.
RME provides a handy command to make QTE's creation easier:
Waits the trigger of a key, during a certain period of time. The command returns true if the correct key has been triggered, false otherwise.
Name|Type|Description --- | --- | ---
key
|Symbol
|Key that the player has to press before the period's endtime
|Fixnum
|Period*strict
|Boolean
|Hardness, if this equals true, no mistake accepted, otherwise mistakes are allowed. By default this equals true.
Concretely, when this command is called, we wait the key's triggering until the alloted time ends. For instance:
When the event starts, we will wait 60 frames. During these 60 frames, if the player presses a key which is not :A
(by default, this key is set as : :shift
), the event will display "Vous avez perdu". This same message will be displayed if the player has not pressed any key during these 60 frames. On the other side, if the key :A
is indeed pressed before time runs out, the event will display "Vous avez gagné".
If the strict
attribute has been set to false
, the player will have the opportunity to make several mistakes during the elapsed time. However, we prefer QTE where no mistakes are admitted !
Here is an QTE's example in which several pictures are displayed:
Technically, we show a picture (which corresponds here to the arrow key that we want the player to press). Obviously, we are able to move the picture (here we have zoomed it) for 20 frames, QTE's duration (but you can define a different one than the QTE's, the choice is all yours). Then comes the QTE's definition (as previously seen) whose we will check the validity to do specific actions. Finally, we will repeat this operation for each combination's element to check. We have used tags here to jump to the "You have lost" message, if the player has failed at least one time. (By the way, this QTE is really hard to achieve because there is only a window of 20 frames to see, understand and press the correct key !)
It will obviously be better to erase the picture n°1, once the QTE is done.
This last way of describing series of QTE is quite not user-friendly ! In fact, let's imagine that we have 250 actions in our QTE, it will be a real pain to describe them all. Let's see a new command that will be handy in such cases:
Returns a random combination (as an iterable array) of the given length (
len
). It is as well composed of the list of keys passed as parameters (*keys
). For instance: `random_combination(5, :UP, :DOWN, :LEFT, :RIGHT ).
Name|Type|Description --- | --- | ---
len
|Fixnum
| Number of combination to generate*keys
|Argslist
|List of keys that can compose the combination
As stated, this command returns an array for those who don't remember it, we can iterate over arrays in RME. Technically, you generate the combination (in a variable for instance), and then iterate over it to display the corresponding picture. Demonstration:
We generate a random combination on which we iterate. This allows us to create QTE of variable length, very quickly !
Creating a potentially infinite QTE works exactly the same way as generating random combination, excepting the fact that you don't have to care about the iterator. To generate such QTE, we use the following command:
Returns an element randomly taken in the array (or the argument's list)
Name|Type|Description --- | --- | ---
*elts
|ArgsList
|Elements in which a random element will be picked. Whether pick_random(a, b, c, d...etc.), whether pick_random([a,b,c,d...etc]).
For instance:
We generate a combination's element at each loop's iteration.
Here is an example showing what the two last exercices look like in game:
All keys described here are allowed to use. However, we recommand to only use the ones used by RPGMaker (i.e: :A
, :C
, :B
, :UP
, :DOWN
, :LEFT
, :RIGHT
, :X
, :Y
, :Z
, :L
, :R
) because these are keys that the player can configure.
Introduction
Revised Syntax
- Switches and variables
- Local switches and local variables
- Tags and local tags
- Displaying informations in messages
Commands
Extended events
Advanced tools
RMEx use examples
- Create basic gauges
- Create gauges in battle
- Create easily a QuickTime Event
- A minimal multi-agents system
- Custom names typing system
- Titlescreen's skipper
Scripters corner