What Array Type to use with "Get Files" Playmaker Action?

Easy Save 2 has been replaced by Easy Save 3, so is no longer supported.
Locked
westingtyler
Posts: 28
Joined: Tue May 10, 2016 4:00 pm

What Array Type to use with "Get Files" Playmaker Action?

Post by westingtyler »

using a string array appears to store nothing even though I thought I was getting filename strings, and even though it seems to be the type the action will "accept".

I use the Get Files action to load all the files in a path into an Array variable. The problem is, at runtime when this happens, the filename strings don't appear to be saved to the designated string array. The Get Files action seems weird in general, like it's missing where you save it to, as you can see in the screenshot. If I select an existing array, that string array, then that seems appropriate but does nothing at runtime, and the string array remains as it was before.

What type of array is needed to save files to it, since 'string' type does not work?

I couldn't find this action in the playmaker reference area.

The tool tips on the action aren't very detailed.
Attachments
gamedev es2 array2.PNG
gamedev es2 array2.PNG (59.55 KiB) Viewed 7924 times
gamedev es2 array.PNG
gamedev es2 array.PNG (50.51 KiB) Viewed 7924 times
Last edited by westingtyler on Mon Oct 01, 2018 6:12 pm, edited 1 time in total.
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: What Array Type to use with "Get Files" Playmaker Action

Post by Joel »

Hi there,

I've tried it with a string array at my end and it appears to work fine for me. Have you ensured that theres a slash at the end of the path? i.e. C:/Users/.../myFolder/ rather than C:/Users/.../myFolder.

If this is not the issue, please could you send me a basic project which replicates this?

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
westingtyler
Posts: 28
Joined: Tue May 10, 2016 4:00 pm

Re: What Array Type to use with "Get Files" Playmaker Action

Post by westingtyler »

okay I'll try to put together a project to replicate it. in the meantime, here are two images of what happens at runtime.

The debug line shows a list of files below the array in the action, but when checking the variables tab the array itself is unchanged from what I set it to before runtime.

I found the ES3 version of Get Files, but it still does the same thing.
Attachments
arr2.PNG
arr2.PNG (79.73 KiB) Viewed 7922 times
arr1.PNG
arr1.PNG (83.01 KiB) Viewed 7922 times
westingtyler
Posts: 28
Joined: Tue May 10, 2016 4:00 pm

Re: What Array Type to use with "Get Files" Playmaker Action

Post by westingtyler »

I used Get Array to get various indices from the array, and it works. i got index 0, 1, and 2, and they show the correct file names. For some reason it's just not showing the updated array entries on the variables page or in the inspector, and if you notice in this image it GOT the correct array index string, but the debug above, shows the un-updated array entries: "should be file name not this.,,,"

What is the best way to make a small project to send?
Attachments
arr3.PNG
arr3.PNG (98.62 KiB) Viewed 7922 times
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: What Array Type to use with "Get Files" Playmaker Action

Post by Joel »

Hi there,

If the values are there but it's not showing them in the Editor, this is likely a bug at PlayMaker's end so you might want to make them aware of this. The Editor GUI is handled at their end.

Also I noticed that your array is initialised with a size of 5. You might want to initialise the array with a size of 0 incase this makes a difference.

Easiest way to PM me a project is to export it as an AssetPackage, upload it to something like Dropbox and then PM me the link.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
westingtyler
Posts: 28
Joined: Tue May 10, 2016 4:00 pm

Re: What Array Type to use with "Get Files" Playmaker Action

Post by westingtyler »

okay, thanks!
djaydino
Posts: 10
Joined: Fri Dec 26, 2014 5:25 pm

Re: What Array Type to use with "Get Files" Playmaker Action

Post by djaydino »

Hi.
Its possible the action does not have SaveChanges on the end of the script.

theArray.SaveChanges();
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: What Array Type to use with "Get Files" Playmaker Action

Post by Joel »

djaydino wrote:Hi.
Its possible the action does not have SaveChanges on the end of the script.

theArray.SaveChanges();
Thank-you. I can't seem to be able to find anything in the PlayMaker documentation which says this is required, but it sounds like this is likely the issue.

If you PM me your invoice number, I'll send over an update which includes this. This will also be included in the next update, though this is not due until towards the end of the month.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Locked