MOBA hero controls
Provides lane-game hero controls: click to walk or attack, attack-move, ability keys cast toward the cursor with mana and cooldowns, blink, heal, stop and a recall that damage interrupts.
MOBA hero controls (moba.hero) #
What it is for #
Provides lane-game hero controls: click to walk or attack, attack-move, ability keys cast toward the cursor with mana and cooldowns, blink, heal, stop and a recall that damage interrupts.
It needs combat.attacks, moba.match, character.motor, combat.abilities, input.actions, game.engine; installing it brings them in.
Turn it on #
Install the kit in a project, then change a setting (the values shown are its defaults):
gripforge_gamekit_install { project_id: "gkp_…", id: "moba.hero" }
gripforge_gamekit_configure { project_id: "gkp_…", id: "moba.hero",
config: { "showRanges": true, "showTowerThreat": true } }
First example #
The kit has no dedicated test yet; this installs it and sets two of its settings to their defaults.
gripforge_gamekit_install { project_id: "gkp_…", id: "moba.hero" }
gripforge_gamekit_configure { project_id: "gkp_…", id: "moba.hero",
config: { "showRanges": true, "showTowerThreat": true } }
Settings and defaults #
Descriptions come from the kit manifest and stay in English.
| Setting | Type | Default | Range or values | Meaning |
|---|---|---|---|---|
showRanges | boolean | true | Attack reach while targeting and ability shapes on HUD hover. | |
showTowerThreat | boolean | true | Nearby tower range and current target. | |
hero | string | "" | moba_heroes id the player plays (default: the first). | |
mana | number | 400 | 0–5000 | |
manaRegen | number | 6 | 0–200 | Mana per second. |
blinkDistance | number | 7 | 1–15 | D: blink toward the cursor, stopping before an impassable wall. |
blinkCooldown | number | 30 | 1–300 | |
healCooldown | number | 45 | 1–300 | |
followSeconds | number | 0.15 | 0.05–2 | 1.6.0: the move button held after a click on the ground: how often the order follows the cursor (0.3 m at least between two… |
Services, events, variables #
- Service
moba.controls: Right-click move and attack, Q/W/E/R casting, mana, recall, bot casting. - Events emitted:
moba.cast(hero,key,ability,yaw) — A hero cast an ability (Q / W / E / R, accepted by combat.abilities), blinked (D) or healed (F).moba.attack(source,target,ranged,kind,synchronized) — A hero started a basic attack.pointer.command(point,kind,target) — The player hero took a move or attack order (a click, a tap, moba.controls.order): the click marker.moba.ping(point,player) — A ping on the map (moba.controls.ping), at most one every 0.6 s; it lasts 3 s.
- Events listened to:
combat.killed,combat.damaged - Variables:
moba.hero(string) — Heromoba.mana(number) — Manamoba.mana.max(number) — Max manamoba.recall(number) — Recallmoba.cd.d(number) — Blink cooldownmoba.cd.f(number) — Heal cooldownmoba.cd.q(number) — Q cooldownmoba.ability.q(string) — Q abilitymoba.cd.w(number) — W cooldownmoba.ability.w(string) — W abilitymoba.cd.e(number) — E cooldownmoba.ability.e(string) — E abilitymoba.cd.r(number) — R cooldownmoba.ability.r(string) — R ability
- Input actions:
moba.move,moba.stop,moba.attack_move,moba.spell_d,moba.spell_f,moba.ability_q,moba.ability_w,moba.ability_e,moba.ability_r,moba.recall
Hooks and modding #
- Hooks (a game or a mod can intercept them):
hero.cast(cancellable) — A hero (the player on a key press, a bot at its half-second casting turn with an enemy hero in reach) is about to cast the ability of key, before combat.abilities checks its cost and cooldown.hero.attack(fields a tap may change:damage; cancellable) — A hero is about to start a basic attack on target (in range, off cooldown, the target may be hit); damage is the hit it will deal.hero.blink(fields a tap may change:distance,cooldown; cancellable) — The player hero is about to blink toward the cursor (D pressed, the spell ready): distance is the farthest it may go in metres (shortened by the cursor and by walls), cooldown the seconds before the…hero.heal(fields a tap may change:amount,cooldown; cancellable) — The player hero, wounded, is about to heal itself (F pressed, the spell ready): amount is the health given back (a quarter of max), cooldown the seconds before the next one.hero.recall(fields a tap may change:seconds; cancellable) — The player hero is about to channel a recall to its fountain (B pressed): seconds is the channel, still interrupted by damage or a move.hero.refill(fields a tap may change:mana; cancellable) — A roster hero died a moment ago and is about to get its mana pool back for its return (asked once per death): mana is the pool it will have.
- Moddable settings:
showRanges,showTowerThreat,hero,mana,manaRegen,blinkDistance,blinkCooldown,healCooldown - Moddable collections:
moba_heroes
Engines #
Declared targets: web, rust. gripforge kit api moba.hero lists the exact settings and services of your version.
Versions #
Kit version 1.6.0.