Save/load game
by GAMEHACK3R · in Technical Issues · 06/25/2007 (9:58 am) · 6 replies
Im not looking for anything overly flash just a way to save a few defaults already in starter.fps during gameplay
ie.
inventory items
maxInv[CrossbowAmmo] = 50;
maxInv[Crossbow] = 1;
player name
and loading when the game starts..
how would i go about doing this ?
ie.
inventory items
maxInv[CrossbowAmmo] = 50;
maxInv[Crossbow] = 1;
player name
and loading when the game starts..
how would i go about doing this ?
#2
how do you go about saving inventory items?
please dont link the inventory save system tutorial it is redundant (2003)
06/25/2007 (10:15 am)
I checked out that resource earlier it is based on triggers and is incapable of saving inventory and as the author says .. "This version works, but only just." it also requires the full UAC system as well how do you go about saving inventory items?
please dont link the inventory save system tutorial it is redundant (2003)
#3
06/25/2007 (10:22 am)
I haven't implemented saving yet, I am still working on AI. However this is the resource I was going to base my save/load system on this.
#4
yeah AI can be a pain, but fun when you get results , i ended up modifying the killer.kork resource to suit my needs , but im guessing from your profile that you are using AI guard as a base . Hows your game going btw .
06/25/2007 (10:39 am)
Ah kk dave yeah AI can be a pain, but fun when you get results , i ended up modifying the killer.kork resource to suit my needs , but im guessing from your profile that you are using AI guard as a base . Hows your game going btw .
#5
function saveload()
{
%file = new FileObject();
%file.OpenForWrite("starter.fps/test.txt");
%file.writeline("This is the test file.");
%file.close();
%file.delete();
}
the error i am getting is here
%file.OpenForWrite("starter.fps/test.txt");
but i dont know how to fix the problem .. any ideas ???
06/26/2007 (11:09 pm)
Not sure where i am going wrong here .. i have tried quite a few different things but i just keep getting the same errorfunction saveload()
{
%file = new FileObject();
%file.OpenForWrite("starter.fps/test.txt");
%file.writeline("This is the test file.");
%file.close();
%file.delete();
}
the error i am getting is here
%file.OpenForWrite("starter.fps/test.txt");
but i dont know how to fix the problem .. any ideas ???
#6
to open the file itself.
also check out these threads:
www.garagegames.com/mg/forums/result.thread.php?qt=23285
www.garagegames.com/mg/forums/result.thread.php?qt=24693
www.garagegames.com/mg/forums/result.thread.php?qt=22767
06/27/2007 (8:22 am)
Try using this:%file.[b]o[/b]penForWrite("[b]./[/b]test.txt");to open the file itself.
also check out these threads:
www.garagegames.com/mg/forums/result.thread.php?qt=23285
www.garagegames.com/mg/forums/result.thread.php?qt=24693
www.garagegames.com/mg/forums/result.thread.php?qt=22767
Torque Owner Dave D
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=11557