Word Script

CodeHunterEx

Hunter of the Perfect Code
Veteran
Joined
Nov 26, 2016
Messages
133
Reaction score
64
First Language
English
Primarily Uses
RMVXA
I would like to know if it is poossible to create a script that does the following:
1) Loads a text file of words and saves it in an array
2) Randomly chooses a word and then puts (length of word) number of signs on the screen

I am try ing to learn scripting, but I am at a loss.

Could someone help me with a script, or create a script that I can use, or learn from?

This is for a game I am working on.
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,640
First Language
Czech
Primarily Uses
RMMV
File manipulation, regular expressions, random numbers and string length. These should be found easily on the internet, if you search for ruby learning material.
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,640
First Language
Czech
Primarily Uses
RMMV
characters, this is how I understood it. It doesn't matter though, the principle is the same no matter what they meant.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,418
Reaction score
7,709
First Language
German
Primarily Uses
RMMV
@CodeHunterEx
For real help, you're already one step too deep and need to take a step back:
What you're asking is "how to do something" without telling what that "something" is, and in all help requests you should always include a description of the effect you want ingame as in "what does the player do or see in his world".
That is because very often, people focus too hard on an idea and miss easier solutions, especially if they're new to something.

That said, what you want can be achieved by text operations - for each step you're talking about there are already specific commands available.
If they don't work, then please post the code you have so far and we can check it for errors.

However, if you're asking this way because you don't know how to start coding, then I rather suggest you go to tutorials that teach you the basics of programing and computer logic. If you don't have that basic and try to solve programming questions without knowing why to do something as well as how, you'll end up as a "cargo cult programmer".
Please read the following link to understand what that means (the excerpt is enough, no need to follow deeper):
https://forums.rpgmakerweb.com/index.php?threads/a-good-article-for-you-budding-scripters.5108/


EDIT:
[move]learning Ruby and RGSSx[/move]
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Frostorm wrote on Featherbrain's profile.
Hey, so what species are your raptors? Any of these?
... so here's my main characters running around inside "Headspace", a place people use as a safe place away from anxious/panic related thinking.
Stream will be live shortly! I will be doing some music tonight! Feel free to drop by!
Made transition effects for going inside or outside using zoom, pixi filter, and a shutter effect
I have gathered enough feedback from a few selected people. But it is still available if you want to sign up https://forums.rpgmakerweb.com/index.php?threads/looking-for-testers-a-closed-tech-demo.130774/

Forum statistics

Threads
105,992
Messages
1,018,189
Members
137,771
Latest member
evoque
Top