RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
text input?

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 82
We learn by living...
I'm trying to figure out a way to create a text input that displays, saves, and can be changed.

Basically, a variable i can stick text into, and then call up to display.

So far the closest I've gotten is something like this:

(inside Script window on page 3 of events)
$game_temp.message_text = "hi"
followed by a control self switch to move out of this loop. (otherwise it loops endlessly).

I tried using specific variables like
$game_temp.message_text = $data_actors[1].character_name

but it causes my icon to delete and calls me 'fighter 001" or some such.

I'm not sure if this can be done with pure eventing, eventing with script references, or if its pure scripting.

*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
I'm confused about something. Do you want the player to be able to actually input text, or do you just want some text stored in a variable?

***
Rep:
Level 82
We learn by living...
for what I'm doing, whichever is easier. I need to be able to save the names of maps/areas, either literally as they are saved in the map directory, or giving an option for players to describe them with a fill in the blank option similar to input number.

****
Rep:
Level 83
Can't you do this by using a name input then converting that into a variable?

example:

call a name impute for actor some ID (its temp) after that is over use a script command:

$game_variables[id] = $game_actor[same id as before].name

i know there there is probably more that your asking, but this is how to set a variable to a string that the player sets.
Spoiler for:
METALFRESH is a paint contractor that specializes in refinishing metal and vinyl siding. We paint metal buildings as well as siding on homes.

We also

    Refinish decks
    Do custom interior painting
    Strip wallpaper
    Refinish cedar siding
    Metal front doors and sidelights
    Metal garage and service doors
    Grained fiberglass doors

    If your structure is *RUSTED *FADED *CHALKING *IN NEED OF COLOR CHANGE, we can fix it with a guarentee!

northern Illinois and southern Wisconsin.

http://metalfreshcoatings.com


*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
Name input has a max of 12 characters, so I don't really think it's what he wants  :-\

***
Rep:
Level 82
We learn by living...
i want something like this, but working:

conditional branch...[something]
Script: $game_variables[1] = map_id
Else
Branch End


conditional branch...[something else]
Script: $game_temp.message_text = $game_variables[1]
Else
Branch End

Basically, a way of saving the name of the map you are currently on, and calling it later in a message text.






*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
Couldn't you just write the name of the map that the player is currently in, in the text box?

So say the character is in Grassy Plain. You could just go Show Text: Grassy Plain.

Or do you want something more complicated then that?

****
Rep:
Level 83
data_maps = load_data("Data/MapInfos.rxdata")
$game_variables[ID] = data_maps[$game_map.map_id].name

that work?

also to show this in a message just use \v[ID].
« Last Edit: May 15, 2010, 04:05:56 PM by Mr_Wiggles »
Spoiler for:
METALFRESH is a paint contractor that specializes in refinishing metal and vinyl siding. We paint metal buildings as well as siding on homes.

We also

    Refinish decks
    Do custom interior painting
    Strip wallpaper
    Refinish cedar siding
    Metal front doors and sidelights
    Metal garage and service doors
    Grained fiberglass doors

    If your structure is *RUSTED *FADED *CHALKING *IN NEED OF COLOR CHANGE, we can fix it with a guarentee!

northern Illinois and southern Wisconsin.

http://metalfreshcoatings.com


***
Rep:
Level 82
We learn by living...
data_maps = load_data("Data/MapInfos.rxdata")
$game_variables[ID] = data_maps[$game_map.map_id].name

that work?

also to show this in a message just use \v[ID].

tried this:

$game_variables[36] = $data_maps[$game_map.map_id].name
$game_temp.message_text = $game_variables[36]

got an error. I'm guessing[$game_map.map_id] is supposed to be specific. I want it to query what the current map is and save it.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
That's not what he asked you to do - what he was suggesting is correct. Do what he told you to do and access it in a message by \v[id].

The reason you are getting an error is because you put a $ in front of data_maps - Map Info is not saved in a global variable though - you have to load it first, which is what the first line Wiggles used was for and which you omitted.

So, do what Wiggles told you to do exactly, and it should work.

*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
Lol Modern, Mr. Wiggles edited his script around a bit. So Shin was just following commands.

PROOF:

« Reply #7 on: Today at 11:02:14 AM »
« Last Edit: Today at 11:05:56 AM by Mr_Wiggles »



*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Well, what Shintashi quoted from Wiggles in his post is correct, so assumedly he must have seen the modified post prior to posting. Anyway, it's not a big deal either way.

***
Rep:
Level 82
We learn by living...
still doesn't work. Tried it four or five different ways, with a number in ID and without.


Quote
Script:data_maps = load_data
("Data/MapInfos.rxdata")
$game_variables[1] = data_maps
[$game_map.map_id].name
Script:\v[ID]
causes an "undefined local variable or method 'data maps' for #<Interpreter..." error






Quote
data_maps = load_data
("Data/MapInfos.rxdata")
$game_variables[ID] = data_maps
[$game_map.map_id].name
causes a 0 for 1 error

Quote
data_maps = load_data
("Data/MapInfos.rxdata")
by itself causes an error

even

Quote
data_maps = load_data
crashes..

they all end up saying the same thing: wrong number of arguments (0 for 1)



*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
Code: [Select]
a = load_data("Data/MapInfos.rxdata")
$game_variables[1] =
a[$game_map.map_id].name

Text: \v[1]

Works...

EDIT: Lol, the script box wasn't big enough to hold the code data_maps = load_data("Data/MapInfos.rxdata").

****
Rep:
Level 83
lol...

Yea i find that problem allot, if the code doesn't fit on the line, and is cut up then you get a syntax.  You have to make it fit on one line some how. or carry over by a space where you can ( = > < all those things)
Spoiler for:
METALFRESH is a paint contractor that specializes in refinishing metal and vinyl siding. We paint metal buildings as well as siding on homes.

We also

    Refinish decks
    Do custom interior painting
    Strip wallpaper
    Refinish cedar siding
    Metal front doors and sidelights
    Metal garage and service doors
    Grained fiberglass doors

    If your structure is *RUSTED *FADED *CHALKING *IN NEED OF COLOR CHANGE, we can fix it with a guarentee!

northern Illinois and southern Wisconsin.

http://metalfreshcoatings.com


*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Yeah, cozzie is right - it needs to fit on one line.

Also, you put it in an in-game message, not in a script line, so:
Text: This map's name is \v[1].

Not

Script: \v[1]

***
Rep:
Level 82
We learn by living...
well it looks like it works, but only for what it does. How do I get the computer to remember the map name as a variable, and call that variable as text later?

For example, if I walk south and want the NPC to say "You came from the northern forest"

Right now it just says "You came from 0" because the v[1] sets back to 0, I'm guessing.

*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
Serious? It worked for me.

Are you sure you put in the call script:

a = load_data("Data/MapInfos.rxdata")
$game_variables[1] =
a[$game_map.map_id].name

And then you used the Show Text command with:

This map is \v[1].


***
Rep:
Level 82
We learn by living...
Serious? It worked for me.

Are you sure you put in the call script:

a = load_data("Data/MapInfos.rxdata")
$game_variables[1] =
a[$game_map.map_id].name

And then you used the Show Text command with:

This map is \v[1].



totally. Now make a second map and link them with transfer player events.
talk to the first sprite with the above code, then place

That map was \v[1].

inside a new sprite on the new map. The computer does not remember what v[1] is.

****
Rep:
Level 83
How are you setting the variable?

cause if the script command is not run it wont set the variable.  You can make it set it in the transfer player, or a corner event that is set to parallel.
Spoiler for:
METALFRESH is a paint contractor that specializes in refinishing metal and vinyl siding. We paint metal buildings as well as siding on homes.

We also

    Refinish decks
    Do custom interior painting
    Strip wallpaper
    Refinish cedar siding
    Metal front doors and sidelights
    Metal garage and service doors
    Grained fiberglass doors

    If your structure is *RUSTED *FADED *CHALKING *IN NEED OF COLOR CHANGE, we can fix it with a guarentee!

northern Illinois and southern Wisconsin.

http://metalfreshcoatings.com


*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
a = load_data("Data/MapInfos.rxdata")
$game_variables[1] =
a[$game_map.map_id].name

Text: \v[1]

Returned MAP001.

Transfered player to MAP002.

Text: \v[1]

Returned MAP001. You're probably doing something wrong...

****
Rep:
Level 83
Demo attached.
Spoiler for:
METALFRESH is a paint contractor that specializes in refinishing metal and vinyl siding. We paint metal buildings as well as siding on homes.

We also

    Refinish decks
    Do custom interior painting
    Strip wallpaper
    Refinish cedar siding
    Metal front doors and sidelights
    Metal garage and service doors
    Grained fiberglass doors

    If your structure is *RUSTED *FADED *CHALKING *IN NEED OF COLOR CHANGE, we can fix it with a guarentee!

northern Illinois and southern Wisconsin.

http://metalfreshcoatings.com


***
Rep:
Level 82
We learn by living...
yep, typo on my part ^^ i had v[2] instead of v[1]