Setting variables and adding text to form a text log?

● ARCHIVED · READ-ONLY
Started by shiori4me 7 posts View original ↗
  1. Couldn't I go

    $game_variables[1] += "Hello world, and welcome to my game!"$game_variables[1] += "The quest begins and the hero travels along rails of light in search for his father"(or set the given variable corresponding to the current day)


    But then, this doesn't support any sort of codes besides pausing mid sentence then conditioning what to add next

    $game_variables[1] += "The hero decided to take the"if $game_switches[1] == true then$game_variables[1] += " left path."else$game_variables[1] += " right path."endwhich if there are a lot of possibilities then there's a lot of conditioning to do.

    And would doing this cause lag or use up a lot of memory or make the save files huge?
  2. Did you try it?


    You can't do it in Control Variables, but you MAY be able to do it in scripts. You might need to set $game_variables[1] to a string first rather than going += straight away.


    I have certainly set a variable to a string value then used it in a Show Text command. I don't think I've tried to concatenate it the way you have though. Give it a go - it'll soon tell you if it doesn't like it :)
  3. You can set them to string using scripts, or any other type really, They aren't restricted.

    Of you want it to support all the escape coffee (\N, \V, \C, etc) you could just use $game_message.add($game_variables[#]) and it should work that way perfectly fine.

    I don't have my reference or any way to check at the moment, but it should be $game_message.add
  4. It doesn't support those mechanics. 

    I put "screw you times \V[1]" and that's literally what it came out as.

    It didn't say "screw you times 0"

    And yes, both his method and my method will display text that was set to a variable, on a fresh project, but neither support message codes
  5. You need two slashes.
  6. Like 

    $game_variables[x] += " She was there,\\V[1] times, actually."end? 

    Because that didn't work.

    It just skipped a slash and then said " She was there,

    \V[1] times, actually"

    which if it recognized that slash as some sort of a code then that proves that it can recognize something lol

    Wait a minute, you mean with Zalerinian's method. Oh, that works. Thanks.
  7. This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.