Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Icey on Thu 20/01/2011 00:09:41

Title: can ags check in a folder on the HDD
Post by: Icey on Thu 20/01/2011 00:09:41
In my game I would like for AGS to check for a .txt file in the game folder. I wanted to know there is a code I can use for this so if the txt file is found then the game will activate something for the player.

something like this is what I had in mind. I know it's wrong but I just wanted to show you how I was thinking of the code.

string new.txt
if (game.infolder == new.txt){
display("here is a gift for you");
cego.addinventory(ikey);
}
Title: Re: can ags check in a folder on the HDD
Post by: Ryan Timothy B on Thu 20/01/2011 00:17:35
Look up File functions and properties in the manual.
There is File.Exists which will check if the file exists. Etc.

Read the manual buddy, you've been using AGS for quite a while now. Also there are probably three dozen threads with the exact question.
Title: Re: can ags check in a folder on the HDD
Post by: Icey on Thu 20/01/2011 00:25:56
Ok.

Btw, Is there a tread searcher site for AGS? that way people(like me) wont make treads that are same as old one?
Title: Re: can ags check in a folder on the HDD
Post by: Ryan Timothy B on Thu 20/01/2011 00:28:20
Yes. Very top of this forum, English words that say....... "Search". lol
Then you can select which threads you want to search instead of having Critics lounge threads showing up when all you want is Tech threads.
Title: Re: can ags check in a folder on the HDD
Post by: Khris on Thu 20/01/2011 00:35:46
The funny thing is, if you are on this forum and use the browser's search function to search for "search", the search link that says "Search" will light right up.

I'm reminded of this classic bash quote:
  <+kritical> christin: you need to learn how to figure out stuff yourself..
  <+Christin1> how do i do that
;D
Title: Re: can ags check in a folder on the HDD
Post by: Icey on Thu 20/01/2011 00:46:56
Wow I did not even see that was there.  :D