The Daily Click ::. Forums ::. Klik Coding Help ::. Random read Array File without browsing
 

Post Reply  Post Oekaki 
 

Posted By Message

radel999



Registered
  07/01/2012
Points
  314
11th June, 2016 at 11/06/2016 22:16:57 -

Hello
Its possible to make a random select Array File?
I wanna make a survival of levels readed from Array files
Like 100 Mario Challenge how random levels appears automatly
Levels is saved in "Levels" Folder.

 
n/a

LordHannu

Crazy?

Registered
  22/04/2007
Points
  7910

VIP MemberStarTeddy BearRibbonGame of the Week Winner2021 Halloween Competition Winner2022 Hi-Score Mash-up Competition (Bronze)2023 Halloween Competition (Bronze)2023 Halloween Competition Entrant
13th June, 2016 at 13/06/2016 01:35:10 -

Yes you can select the saved array file randomly. Can add a random number into the array files name.
Appdir$+"Levels/Stage"+Str$(random(100))
Result when loading Form the application directory folder Levels with file name "Stage50" for example.


 
n/a

radel999



Registered
  07/01/2012
Points
  314
13th June, 2016 at 13/06/2016 16:10:34 -

Umm. You can send the example
i tryed paste the code what your writed but still don't read levels

 
n/a

LordHannu

Crazy?

Registered
  22/04/2007
Points
  7910

VIP MemberStarTeddy BearRibbonGame of the Week Winner2021 Halloween Competition Winner2022 Hi-Score Mash-up Competition (Bronze)2023 Halloween Competition (Bronze)2023 Halloween Competition Entrant
14th June, 2016 at 14/06/2016 17:34:34 -

Image
What are the name of your files in the levels folder?
I just called them stage just as an example.

 
n/a

radel999



Registered
  07/01/2012
Points
  314
14th June, 2016 at 14/06/2016 17:51:56 -

Simple "Levels"

 
n/a

LordHannu

Crazy?

Registered
  22/04/2007
Points
  7910

VIP MemberStarTeddy BearRibbonGame of the Week Winner2021 Halloween Competition Winner2022 Hi-Score Mash-up Competition (Bronze)2023 Halloween Competition (Bronze)2023 Halloween Competition Entrant
16th June, 2016 at 16/06/2016 05:18:49 -

So my suggestion would be name your array files Levels1, Levels2, Levels3 and so on.
and have the game next to levels folder. And load them Appdir$+"Levels/Levels"+Str$(random(100))
random you can change to any number you wish depending how many levels you have done.

You have something that reads the positions?

 
n/a

radel999



Registered
  07/01/2012
Points
  314
16th June, 2016 at 16/06/2016 13:13:45 -

Of Course
Its actually source of my game called "HTFA Maker"
http://www.mediafire.com/download/aes30990ubzm0k7/HTFAMaker+Source.mfa
I don't know what i made wrong

 
n/a

LordHannu

Crazy?

Registered
  22/04/2007
Points
  7910

VIP MemberStarTeddy BearRibbonGame of the Week Winner2021 Halloween Competition Winner2022 Hi-Score Mash-up Competition (Bronze)2023 Halloween Competition (Bronze)2023 Halloween Competition Entrant
16th June, 2016 at 16/06/2016 20:37:04 -

Downlaoded your file but i cant open it need gwedry-circular.mvx
searched for it and found "one google result" darkwires site but i couldnt download it from there becouse they are redesigning the site or something.

 
n/a

radel999



Registered
  07/01/2012
Points
  314
16th June, 2016 at 16/06/2016 22:00:48 -

Ok
Download Here:
http://www.mediafire.com/download/58s3ijgendkxi7f/gwedry-circular.mvx

 
n/a

LordHannu

Crazy?

Registered
  22/04/2007
Points
  7910

VIP MemberStarTeddy BearRibbonGame of the Week Winner2021 Halloween Competition Winner2022 Hi-Score Mash-up Competition (Bronze)2023 Halloween Competition (Bronze)2023 Halloween Competition Entrant
17th June, 2016 at 17/06/2016 14:35:23 -

...hmmm ill see with a friend of mine if its possible to select a random file in a folder. with diffrent file names.
Ive never done that.

Edited by LordHannu

 
n/a

radel999



Registered
  07/01/2012
Points
  314
17th June, 2016 at 17/06/2016 22:26:09 -

Ok.

I hope that you will succeed

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
18th June, 2016 at 18/06/2016 13:06:40 -

You can use a list object. It has a function to list all the files in a folder. Then you can just pick a random line from the list, and load that file.

 
n/a

LordHannu

Crazy?

Registered
  22/04/2007
Points
  7910

VIP MemberStarTeddy BearRibbonGame of the Week Winner2021 Halloween Competition Winner2022 Hi-Score Mash-up Competition (Bronze)2023 Halloween Competition (Bronze)2023 Halloween Competition Entrant
18th June, 2016 at 18/06/2016 19:32:08 -

Oh it could!
Appricate the help, thanks Sketchy!

 
n/a
   

Post Reply



 



Advertisement

Worth A Click