Scripts:Dash

From OHRRPGCE-Wiki
Revision as of 08:26, 10 September 2009 by Bob the Hamster (talk | contribs) (example dash script)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump 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 on-keypress handler in the Edit General Map Data menu for each map where you want to enable dashing.