Skip to content
mpetrovic edited this page Apr 15, 2011 · 1 revision

Component

Any time combat is going on, it's in this. I need to work this so that combat events can start Cutscenes, and cutscenes can start combat. Hm, wouldn't an entity with both Cutscene and Combat work?

Properties:

  • Player -- all the player Characters. It's an array keyed off positions.
  • Enemies -- all the npc Characters they're fighting again. Same config as enemies
Methods:
  • setup(party, enemies, background, music_override) -- set up the battle with an array of players, enemies, the image to use for the background, and whether to use the combat music over the already playing music
  • play() -- start or resume combat
  • pause() -- pause combat
  • end() -- the battle is over
A lot of what's going on is taken care of in the Character component.
Clone this wiki locally