Hey guys
I'm new to the RPG Maker world, and i'm attempting to make my first script.
I'm trying to make a fishing rod script that when you use your fishing rod in your inventory, it runs a script that detemins if what is in
front of you is water or not.
Now with the limited knowledge i have, i thought that a way you might do it is to store a variable with your character's Y Co-Ordinate on the map, add one to it
and then see if the co-ordinate in the variable matches up to the TILE-ID of the water tile
Now i know so so so so so very very little about ruby...And that probably will make people laugh...But can someone help me out
I don't want people to write the whole script for me, How would i ever learn that way.
What i would like from you guys, is a bit of help getting started with it i guess
Thanks nixcluster
OK, first we better check the termonology ;-)
What is called scripting in RM is a full programming language, putting scripts into the script editor to add new functions (like layered maps, new screens for crafting or changing the game into an action-RPG with on-map-battles or so on) into the game - and that is absolutely NOT needed for what you want to do.
What other game engines often call "scripting" is called eventing in RM, and that's what is usually needed to make quests or ingame-checks in an RM-Game.
The best way to do this would be to make an item "fisihing rod" that calls a common event "fishing" when used.
In that common event you use the "control variable" command to get the current player position into variables, then use conditional branches (player facing) to select which variable to increase/decrease to get the position in front of the player.
Then use the "get location info" command to get that positions map info - depending on how you want your system to work, you could either get a region ID, a terrain tag or the tile ID into another variable.
Last step would be checking that variable, and if the code is valid execute the code for fishing.
If you're really new to RM, you might want to follow the link in my signature to get some basic tips and tutorials for how to proceed.
Aha! Never underestimate the power of variables!
Thanks a bunch for that! I'll get to work adding it into my game. I KNEW! there was a way to do it through events...Just couldn't figure it out
And yeah i will check out that link. I'm keen to learn as much as i can.
Thanks
Oh.And also thank you for not explaining step by step on exactly what i should be doing...Give's me a chance to do it myself 🙂
I GOT IT! xD THANK YOU THANK YOU THANK YOU!
More or less repeating what you said..but here's what i did
Created 3 Variables Called "Pos X" ," Pos,y" and "Water"
I did a Control Variable on "Pos x" and "Pos y", Setting them both to x and y respectively
Then i ran a conditional statement, when if my character was facing left, Variable "Pos x" was minused by one.
I then ran a get Location info, Storing the terrain tag details of variable "Pos x" And "Pos y" into "Water" (Also i set the terrain tag of water to 1)
Then another Conditional statement if "Water" equaled to one, Run fishing event
I REALLY! Appreciate the help. Now i just have to set up the rest of the Directions, and the actual fishing event itself. (which is just a random number stored in a variable, and diffrent fish are caught depending on what the number is)
Thanks again!21
Ah sorry! I got a little over excited. Won't happen again
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.