Re: Settings file in BGT

2017-05-21 Thread AudioGames . net Forum — Developers room : gabriel-schuck via Audiogames-reflector


  


Re: Settings file in BGT

jonikster wrote:Hello!Prompt please, as in BGT to make a file of settings. For example, I have a file with the following content:Name = JohnHp = 100How in BGT to download and use these settings?P.s. The file object is signed, but I do not know how to get name, hpThanks in advance!I recommend that you use escape characters, such as return (\ r) and newline (\ n), to use as a separator in order to split the information with the string_split function.In a file you can do something like:config1=sometingconfig2=sometingconfig3=sometingAnd then you could have in your code something likestring[] config;file configs;configs.open (config.txt","r");config=string_split(configs.read(),"\n",false);configs.close();And then you can make conditions likeif (config[x]=="config0=yes"){//do someting}else if (config[x]=="config0=no"){//do someting}I hope I have helpedRegards

URL: http://forum.audiogames.net/viewtopic.php?pid=312078#p312078





___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: Settings file in BGT

2017-04-24 Thread AudioGames . net Forum — Developers room : Guitarman via Audiogames-reflector


  


Re: Settings file in BGT

Hi jonikster.You seem to have a lot of questions about bgt and python. You keep making a whole bunch of new topics to ask each question. Why don't you make one topic to ask your questions, it would be easier for you and for us who read them.Like I said I think your going to run into trouble, if you keep asking people for lines of code. If you can't figure these things out yourself, your setting yourself up for failure. You seem to know some things about bgt, I don't know why you keep needing so much help.

URL: http://forum.audiogames.net/viewtopic.php?pid=308466#p308466





___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: Settings file in BGT

2017-04-23 Thread AudioGames . net Forum — Developers room : cartertemm via Audiogames-reflector


  


Re: Settings file in BGT

I've seen a couple different ways to manage settings files. First off, there's encrypting the file, or making it look like the following:john,0,3,2,8Then use string_split like:string[] values=string_split(f.read(),",",false);values[0]=username;values[1]=achievements;//and so onAnd for the way you described, essentially, you'd read the file, use string_split with "\r\n", and parse item=value.

URL: http://forum.audiogames.net/viewtopic.php?pid=308392#p308392





___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Settings file in BGT

2017-04-22 Thread AudioGames . net Forum — Developers room : jonikster via Audiogames-reflector


  


Settings file in BGT

Hello!Prompt please, as in BGT to make a file of settings. For example, I have a file with the following content:Name = JohnHp = 100How in BGT to download and use these settings?P.s. The file object is signed, but I do not know how to get name, hpThanks in advance!

URL: http://forum.audiogames.net/viewtopic.php?pid=308297#p308297





___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector