Scripts:Dash

From OHRRPGCE-Wiki
Jump to navigationJump to search

Download: Example RPG file using this script

A common feature in RPGs is the ability to have a "Dash" button that causes the player to run faster. Although the OHRRPGCE does not have a built-in feature for this, it is fairly easy to replicate with a simple plotscript.

include, plotscr.hsd
include, scancode.hsi

plotscript, on keypress handler, begin
  if(hero is walking(me) == false) then(
    set hero speed(me, 4)
    if(key is pressed(key:Z)) then(
      set hero speed(me, 10)
    )
  )
end

Set this script as the default on-keypress handler in the Special Plotscripts menu (under General Game Data) to make it work everywhere, or alternatively Edit General Map Data menu for each map where you want to enable dashing.