Talk:Is it possible for the game to know if you ran from the last battle and do something about it?

From OHRRPGCE-Wiki

Jump to: navigation, search

Andrusi: It'd probably be wise to add in a way to tell whether the player ran or died. Seems trivial (just check everyone's current HP, and if anyone's is nonzero, they obviously survived the battle), but I'm out of practice and don't remember how to plotscript it.

Mike C. The code to do that looks like this:

script, party alive, begin
  variable(i)
  return (false) #assume everyone is dead
  for(i,0,3,1) do, begin
    if(get hero stat(i,stat:HP,current)) then (return(true))
  end
end
Personal tools