Setting a direction from a variable

Status
Not open for further replies.
Joined
Jul 2, 2014
Messages
7
Reaction score
0
First Language
English
Primarily Uses
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.
 

Zoltor

Veteran
Veteran
Joined
Jan 18, 2014
Messages
1,550
Reaction score
211
First Language
English
Primarily Uses
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.
 
Last edited by a moderator:
Joined
Jul 2, 2014
Messages
7
Reaction score
0
First Language
English
Primarily Uses
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.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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])
 
Joined
Jul 2, 2014
Messages
7
Reaction score
0
First Language
English
Primarily Uses
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 :)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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.
 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,074
Members
137,578
Latest member
JamesLightning
Top