Setting a direction from a variable

● ARCHIVED · READ-ONLY
Started by James the Cheapskate 6 posts View original ↗
  1. How do I set the direction of the main actor from a saved variable?

    It's easy to save a direction from game data, but it kind of looks like I might have to do a script in order to set the game data from a variable.  I could use nested if/elses to get this to work with the player transport event, but that seems like it should be unecessary.

    If you have some link for me to read instead, that would be fine, I didn't find what I was looking for with my searches so far.
  2. James the Cheapskate said:
    How do I set the direction of the main actor from a saved variable?

    It's easy to save a direction from game data, but it kind of looks like I might have to do a script in order to set the game data from a variable.  I could use nested if/elses to get this to work with the player transport event, but that seems like it should be unecessary.

    If you have some link for me to read instead, that would be fine, I didn't find what I was looking for with my searches so far.
    Under variaiables, there's an option called game Data, in the game data options, pick char, and you'll see options for char location, direction, and map locations.

    Sorry I'm not good at locating specific things when I want them on this site, so I can't give you the fun with Variables(I think that was its name) link, but I'm sure someone else will pop in here to do so before long.
  3. Can what you're describing set the game data from a variable?  I'm able to set variables from game data, but I don't know how to go in the opposite direction.
  4. In a Script event command, do this (replace 5 with whatever variable id you're using - without any leading zeros):

    Code:
    $game_player.set_direction($game_variables[5])
  5. Cool. That worked great.  I see from digging a bit that all of the low-level goodies like this are in Tools -> Script Editor (F11).

    Thanks :)
  6. Yes. But if you don't know what you're doing, look, but don't touch ;)


    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.