txt_load files into resource

Posted By: zazang

txt_load files into resource - 10/01/08 04:48

Hello

The txt_load function(for loading text files into a text object) is a real life-saviour for certain rpg game elements in our game , but unfortunately these txt files are not getting packed into a resource. Can resource packing of txt files also be possible ?. Otherwise we dont know how to secure the info in our txt files frown
Thanks

regards
zazang
Posted By: FBL

Re: txt_load files into resource - 10/01/08 06:46

Unpack them from the resource, read them, delete them.

Don't know the exact command, it might be some file_copy or so - check the manual.
Posted By: zazang

Re: txt_load files into resource - 10/01/08 08:52


Ok file_cpy is the command. This is from the manual :-

// unpack a packed a text database file from the game resource
file_cpy ("database.txt","database.pak");

However I dont understand how I can pack my .txt file into a .wrs or a .pak file. frown

Thanks a lot !
Posted By: Spirit

Re: txt_load files into resource - 10/01/08 09:27

For .pak, only rename your text file from .txt to .pak. For putting it into the resource, you need a line like 'BIND "mytextfile.pak";' in your WDL file.
Posted By: zazang

Re: txt_load files into resource - 10/01/08 14:32

Much appreciated help..thanks Spirit !
© 2024 lite-C Forums