How do I create a text log generator?

Get help using Construct 2

Post » Wed Jan 13, 2016 9:30 am

zenox98 wrote:
Alsttr wrote:So I'm assuming I'll just have to read the manual on the different expression C2 has to offer, right?


I would have thought the manual would be anyone's first step, followed by a few tutorials to understnd how the C2 Event System works.

After that, you should be able to at least get close to what you want to achieve, and also be able to ask more detailed and targetted questions.

Good luck, and have fun.


Yeah, you're right. I actually did poke around with the software a little after watching a few tutorials for C2 basics. I figured the manual would be difficult to digest before knowing how everything roughly works. Does the manual offer explanations for all the expressions C2 has?
B
3
Posts: 9
Reputation: 193

Post » Wed Jan 13, 2016 6:59 pm

B
89
S
30
G
95
Posts: 5,157
Reputation: 63,450

Post » Fri Jan 15, 2016 1:02 am

The simple stupid way to change the probabilities of any given entry in a straight list is to have multiple entries of each one you want to appear more.

Like:

[[cat]],[[cat]],[[dog]],[[human]],[[human]],[[human]],[[human]]

then just use Array.At(random(Array.Width))
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,365
Reputation: 4,724

Post » Fri Jan 15, 2016 2:12 am

gumshoe2029 wrote:The simple stupid way to change the probabilities of any given entry in a straight list is to have multiple entries of each one you want to appear more.

Like:

[[cat]],[[cat]],[[dog]],[[human]],[[human]],[[human]],[[human]]

then just use Array.At(random(Array.Width))


I don't think that would be a good way because I have a list of over 100 items and honestly they're phrases not words. But thanks though!
B
3
Posts: 9
Reputation: 193

Post » Sat Jan 16, 2016 6:15 pm

Yea, there are other more sophisticated ways of doing it too, like what R0j0hound pointed out. You can use statistical distributions to change the way random functions pull indices out.
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,365
Reputation: 4,724

Post » Sun Feb 14, 2016 9:36 am

R0J0hound wrote:If your lists are large it makes no difference. You can set the text variables in the same way, but it may not look the cleanest with the event view. Another way is to have the lists in a text file included in the files folder of your project, and loading it with the Ajax object.

The only complicated looking thing is the tokenat and tokencount expressions but the manual explains them.


I managed to do the thing with the probability! Now I just need to know what happens if the thing i'm displaying is a sentence, and it has a comma in the sentence? Wouldn't it mess up the list?
B
3
Posts: 9
Reputation: 193

Post » Mon Feb 15, 2016 7:37 am

If you use commas in your sentences. use a different symbol to separate them.
B
89
S
30
G
95
Posts: 5,157
Reputation: 63,450

Post » Mon Feb 15, 2016 7:47 am

R0J0hound wrote:If you use commas in your sentences. use a different symbol to separate them.


What do you mean? How does one do that?
Also, I tried loading the stuff with Ajax object, but somehow it displays the whole text file instead. How do I fix this?
B
3
Posts: 9
Reputation: 193

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests