Check for folder/files

This forum is currently in read-only mode.
From the Asset Store
Source File, music and art pack for Android Negotiator
  • I know it's possible to check within the application for files and folders using the "File" object, however, what I am trying to do is check a player's desktop for files with certain traits. Sort've like a Psycho-Mantis-Metal-Gear-Solid scenario

    For Example:

    player overlaps a sprite, if the player's desktop contains a file named "let-me-in.txt", send player to "Layout2", if not, write text "Hint: bla bla bla"

    Or something like:

    player overlaps a sprite, if player's desktop contains a file named "square", and file height=file width, send player to "Layout 3"

    stuff like that�Would I need to use Python scripting for this, or is there a "simpler" way?

    Any ideas?

  • You can do that with the path and file objects.

    ex:

    + File: File Path.Desktop & "let-me-in.txt" exists

    I don't know about the "square" one, files don't have dimensions.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • hmm, much simpler than I thought! I was trying all kinds of insane stuff with the registry key object...

    I mentioned the file size because on mac (i have bootcamp partition just for construct) file dimensions are listed for image types.

    Thanks R0J0, i;ll see what I can do.

  • any ideas here??

  • ROJO didn't mean to just type. He said to use the file object and the path object.

    Add the path object to your app, then either type

    path.Desktop

    or click on the path object in the wizard and select "Get Desktop"

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)