MarkHest wants to learn RGSS!

Started by MarkHest, June 19, 2012, 12:51:10 am

Previous topic - Next topic

MarkHest

June 19, 2012, 12:51:10 am Last Edit: June 19, 2012, 12:52:29 am by MarkHest
Hi, just resently i started learning RGSS to make scripts for RMXP. This topic is practically just a 'help' topic for myself whenever i need help with something that has to do with scripting.
I made this topic so that i don't have to create a 'new' topic for every single question i have(there will be a few...) and that i only have to create a post here instead.
I will always look for help in the 'help' file for RGSS first before i ask question. So if i post a question here it is one of the following reasons: I am too stupid to find the answer, the answer did not exist, i understand parts of the answer but i need to know more.

So yeah, let me start with the first question:
I know i can use $game_map.events[ID].moveto(0, 0) to move events on a map, but what do i write to select the 'event in process' instead of an event ID. Meaning, move the event i am placing the ScriptCall in.

Question two: And the other queston is the same but i want to move the player instead of an event.

I just want to know what to write instead of events[ID].
   

G_G

character = get_character(character_type)
character.moveto(x, y)


Substitute "character_type" for one of the following:
-1 = The player.
0 = The current event that's processing the script call
Alternatively, you can also replace "character_type" with an actual event id.

EDIT: Also throwing this out there, we have a thread for general questions and whatnot.
http://forum.chaos-project.com/index.php/topic,2966.0.html

MarkHest

June 19, 2012, 01:13:48 am #2 Last Edit: June 19, 2012, 01:23:05 am by MarkHest
So it should look like this if i want to move the event in process?
$game_map.character = get_character(0).moveto(0, 0)


or maybe like this?
$game_map.character = get_character(0)
$game_map.character.moveto(x, y)


:O.o:

*Tests it out*
edit: error :(

and about your help topic, i'd rather have a separate topic where i can keep track of what i am doing.
   

KK20

Literally, copy and paste that code G_G provided into a script call within an event and change the placeholder parameters with actual values. And watch the magic work~  :D

You can look up 'Interpreter 2' and scroll to the bottom where it says 'def get_character(parameter)' if you want to understand the code more.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

MarkHest

Oh, thank you G_G and KK20!
Worked perfectly! :)

I never said i was a 'total' beginner and that my knowledge is very limited.
More stupid quesions will show up in the future :^_^':
   

MarkHest

Okay! NEW QUESTION!

I just resently took on the task to try and make a new option in the menu, by doing this i switched the 'Save' option to a new option called 'Info'.
So i wanted this new option in the menu to be called 'Info'. I just have a few questions about the few commands that i can't seem to understand.

First off we have the Window Command. I've seen @help_window = Window_Help.new in nearly every Scene_Menu script and wonder what this command is and what it does. Why is it named 'help'? What is a 'help window'?
   

G_G

The help window gives information about RPG data in various scenes.

Scene_Skill
- It's what displays the Skill's description.
Scene_Item
- It's what displays the Item's description.
Scene_Equip
- Weapon/Armor description.
Scene_File/Save/Load
- Telling you what slot to choose
Scene_Battle
- Displays Skill description
- Displays Item description
- Displays battler name when choosing target
- Displays the Skill or Item that's getting used at the moment.

MarkHest

Oh! That explains a lot :D
Thanks ^^