From dcf61eedc3f19af5a98ffd78439306ffe205ad77 Mon Sep 17 00:00:00 2001 From: 1029chris <1029chris@gmail.com> Date: Tue, 14 Feb 2017 15:55:44 -0800 Subject: Added save game/load game system game auto saves when fight ends --- virus2.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'virus2.lua') diff --git a/virus2.lua b/virus2.lua index ce2726c..317c8e4 100644 --- a/virus2.lua +++ b/virus2.lua @@ -322,6 +322,8 @@ function drawVirusFight2() if v1.explodeEndFrame >= 20 then v2.start = false if v2.c.health == -20 then + local prevSave = love.filesystem.read("savegame.txt") + love.filesystem.write("savegame.txt", prevSave .. "v2.complete = true;virus2Lose = " .. virus2Lose .. ";") scene = 1 win[4].w = 200 antivirus.status = "Virus Defeated" -- cgit