IS THERE A WAY TO COPY A SCRIPT IN GAME TO A TXT FILE?
Posts
Pages:
1
SO i am using this script:
#==============================================================================
# Simple Quest-Log
#
# Version : 1.3a - 04.04.08
# Created by : hellMinor
# Do NOT redistribute without my permission
# Description : A simple script for a Quest-Log
#
#==============================================================================
and i was wondering if ther eis a way to print the questlogs i wrote to a text file once the player has completed the quest? because then the player would have a text file that tells him what he previously did, sort of like a mini novel^^
#==============================================================================
# Simple Quest-Log
#
# Version : 1.3a - 04.04.08
# Created by : hellMinor
# Do NOT redistribute without my permission
# Description : A simple script for a Quest-Log
#
#==============================================================================
and i was wondering if ther eis a way to print the questlogs i wrote to a text file once the player has completed the quest? because then the player would have a text file that tells him what he previously did, sort of like a mini novel^^
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
If you have the data stored in a string somewhere in the script, you can print it to a text file with this line of code:
Replace my_quest_log with the name of the string variable that the quest log is stored in, and of course replace questlog.txt with whatever filename you want.
If the text file already exists, the text you write to it will be added at the end, so you can use this to incrementally add to a quest log as the game goes on.
The simplest way to do this would be to make a new method inside the script that does nothing but call this line of code with the string variable. And then use a Script Call to call your new method whenever the player completes a quest.
File.open("questlog.txt", 'w') { |file| file.write(my_quest_log) }
Replace my_quest_log with the name of the string variable that the quest log is stored in, and of course replace questlog.txt with whatever filename you want.
If the text file already exists, the text you write to it will be added at the end, so you can use this to incrementally add to a quest log as the game goes on.
The simplest way to do this would be to make a new method inside the script that does nothing but call this line of code with the string variable. And then use a Script Call to call your new method whenever the player completes a quest.
Pages:
1













