How do I make random looking but repeating room descriptions

Get help using Construct 2

Post » Sun Jan 17, 2016 8:56 am

I want to have a list of room descriptions from a list say 20 variable in length be given in what looks like a random way but isn't. So room 1 would always give the same descriptions, no matter what computer you're on. So would room 2, 3, etc.

I was going to go through the list in a binary fashion to use every combination, but it leaves some descriptions lingering for far too long.

I though someone else might have a bright idea on the matter already? :) Help is appreciated :)
B
47
S
14
G
4
Posts: 177
Reputation: 5,389

Post » Sun Jan 17, 2016 9:01 pm

If they're the same no matter what computer you're on couldn't you just make the list beforehand and include it in your game?
B
85
S
27
G
85
Posts: 5,073
Reputation: 57,880

Post » Sun Jan 17, 2016 10:36 pm

Thousands of rooms.

If you're talking about some way of attaching a txt file to it for the game to read, I'm not sure how to do that and would appreciate any tips given.
B
47
S
14
G
4
Posts: 177
Reputation: 5,389

Post » Sun Jan 17, 2016 11:01 pm

You can add a text file to your project's "files" folder then use the AJAX object to load it to a variable when you run your game.
B
85
S
27
G
85
Posts: 5,073
Reputation: 57,880

Post » Mon Jan 18, 2016 6:05 am

Well, I tried throwing myself at it since you implied it's easy ... and half trying out a tutorial at the same time I did manage to make it load up the data from a txt file. It seemed to load all of it at once, so I guess I'll have to use tokenat to break it down into an array. As I recall the other tutorials I tried had all sorts of code in the data and it was OTT for me.

Thanks, Rojo
B
47
S
14
G
4
Posts: 177
Reputation: 5,389


Return to How do I....?

Who is online

Users browsing this forum: cgsammu and 11 guests