Skip to content
This repository was archived by the owner on Feb 1, 2026. It is now read-only.

Commit 9079b52

Browse files
committed
8.1.3
1 parent 822e266 commit 9079b52

File tree

4 files changed

+46
-1
lines changed

4 files changed

+46
-1
lines changed

input.yyp

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/__input_macros/__input_macros.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Feather disable all
22

3-
macro __INPUT_VERSION "8.1.3"
3+
#macro __INPUT_VERSION "8.1.3"
44
#macro __INPUT_DATE "2025-04-14"
55
#macro __INPUT_DEBUG false
66

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Feather disable all
2+
/// @desc Returns last pressed verb from among the array of verbs provided
3+
/// If no verb array is provided, all defined verbs will be check instead
4+
/// @param [verbArray=all]
5+
/// @param [playerIndex=0]
6+
7+
function input_check_press_last(_verb_array = all, _player_index = 0)
8+
{
9+
__INPUT_GLOBAL_STATIC_LOCAL //Set static _global
10+
__INPUT_VERIFY_PLAYER_INDEX
11+
12+
var _verbs_struct = _global.__players[_player_index].__verb_state_dict;
13+
if (!is_array(_verb_array)) _verb_array = _global.__basic_verb_array;
14+
15+
var _max_time = -1;
16+
var _max_verb = undefined;
17+
var _i = 0;
18+
repeat(array_length(_verb_array))
19+
{
20+
var _verb = _verb_array[_i];
21+
var _verb_struct = _verbs_struct[$ _verb];
22+
23+
if (_verb_struct.__press_time > _max_time)
24+
{
25+
_max_time = _verb_struct.__press_time;
26+
_max_verb = _verb;
27+
}
28+
29+
++_i;
30+
}
31+
32+
return _max_verb;
33+
}

scripts/input_check_press_last/input_check_press_last.yy

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)