Main
Projects
Art
Music
Scripting
LiveJournal
Forum
Links
Death Script
by James `SPAM Man' Paige

Wondering how to make an impossible battle? Wonder no more. This script provides everything you need, though you may want to change the battle formation number to suit your game.


include, plotscr.hsd
include, gamename.hsi

#---------------------------------------------------------

define script (5,unbeatable boss,none)
define script (6,die in battle,none)

#---------------------------------------------------------

script, die in battle, begin

  #this script is set as your "game-over script" in "special plotscripts"
  #in the "General Game Data" menu. It is ALWAYS run when you die in
  #battle, but what happens when it runs varys depending on if the
  #"do not die" tag is ON or OFF. When the tag is OFF, and you are mortal,
  #this script just ends the game. When the tag is ON, the script revives
  #any dead heros to 1 HP

  #this variable is needed by the "for" loop
  variable(i)

  #here we check the value of the "do not die" tag.
  if(check tag(tag:do not die)==OFF)
  then,begin
    #this is normal, mortal behavior
    game over
  end
  else,begin
    #this is special immortal behavior.
    for(i,0,3) do,begin
      if (get hero stat(i,stat:HP,current stat) <= 0)
      then (set hero stat(i,stat:HP,1))
    end
  end

end

#---------------------------------------------------------

script, unbeatable boss, begin

  #this script should be triggered by the NPC that represents
  #the boss. All it does it turns on the tag that makes you
  #unkillable, triggers the battle with the boss, and then
  #turns off the tag and makes you mortal again

  set tag(tag:do not die,ON)

  fight formation(20)

  set tag(tag:do not die,OFF)

end

#-----------------------------------------------------------

Site layout (c)2000 Jennifer Raby. Used by permission.