Difference between revisions of "Text Skipping Protection"
From The Official Visionaire Studio: Adventure Game Engine Wiki
(Created page with "{| class="ts" style="width:100%" |- ! style="text-align:left" | Name !! style="text-align:left" | Type !! style="text-align:left" | By |- | Text Skipping Protection || Definit...") |
|||
Line 7: | Line 7: | ||
This script keeps the user from skipping character and narration texts accidentally by deactivating the cursor for a small amount of time when a text appears. | This script keeps the user from skipping character and narration texts accidentally by deactivating the cursor for a small amount of time when a text appears. | ||
+ | |||
+ | <span class="red">Note that this script is no longer needed. In version 5.3 Visionaire included the option "Delay between text skips" in the [[Game Properties]].</span> | ||
Latest revision as of 17:20, 15 January 2024
Name | Type | By |
---|---|---|
Text Skipping Protection | Definition | AFRLme (& others) |
This script keeps the user from skipping character and narration texts accidentally by deactivating the cursor for a small amount of time when a text appears.
Note that this script is no longer needed. In version 5.3 Visionaire included the option "Delay between text skips" in the Game Properties.
Instructions
Add the main script to the Visionaire Studio Script Editor and set the script as a definition script.
Main Script
-- Prevent accidental text skipping
function delaySkipText(text)
if not text.Background then
game.AlwaysAllowSkipText = false
if game.HideCursor == false and game.CutsceneAction:isEmpty() then
game.HideCursor = true
setDelay(300, function() game.AlwaysAllowSkipText = true; game.HideCursor = false end)
else
setDelay(300, function() game.AlwaysAllowSkipText = true end)
end
end
end
registerEventHandler("textStarted", "delaySkipText")