can ags check in a folder on the HDD

Started by Icey, Thu 20/01/2011 00:09:41

Previous topic - Next topic

Icey

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.
Code: ags

string new.txt
 if (game.infolder == new.txt){
display("here is a gift for you");
cego.addinventory(ikey);
}

Ryan Timothy B

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.

Icey

Ok.

Btw, Is there a tread searcher site for AGS? that way people(like me) wont make treads that are same as old one?

Ryan Timothy B

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.

Khris

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

Icey

Wow I did not even see that was there.  :D

SMF spam blocked by CleanTalk