Charas-Project
Game Creation => Requests => RPG Maker Programming => Topic started by: lonewolf on July 07, 2009, 02:04:37 AM
-
can any one help me on a fishing one you have a bird that can go fishing for you and the bird get the fish what then becomes a item you can then open up that item box
when you go in a shop to sell that fish
what i need help with is how to make it all work in a event
-
Is this what you mean?
Event one (The Bird): Have it so the bird moves, and catches the fish with a move event. Then end with the fish item getting added to the inventory, which you can then sell. End event.
If there are multiple fish, you can do a random variable to determine which you catch, and then have a bunch of conditional variables to check what the value of the variable is, and then add the fish with the corresponding value.
-
Is this what you mean?
Event one (The Bird): Have it so the bird moves, and catches the fish with a move event. Then end with the fish item getting added to the inventory, which you can then sell. End event.
If there are multiple fish, you can do a random variable to determine which you catch, and then have a bunch of conditional variables to check what the value of the variable is, and then add the fish with the corresponding value.
yes that's the way i was thinking how to do it
-
Well, first of all, is the move event. Move events are one of the cornerstones of any game. They can be tricky until you get the hang of them, but I recommend you play around with them until you master them. The help feature in the event scripts has lots of useful information, as does the programming FAQ.
As for the fish themselves, like _JeT_ explained, this is all done with variables. As with move events, variables are a feature you must master. First you must actually create the "fish" as items in your database. You then set the event to generate a random number variable with the "Variable operation" function. Finally, you create multiple conditional statements with the "Conditional branch" function that add the corresponding fish to your inventory. It might look a little something like this.
<>Variable Oper: [0039:catch fish] Set, Rnd [1-5]
<>Branch if Var [0039:catch fish] is 1
<>Change items: Red fish 1 Add
<>Branch if Var [0039:catch fish] is 2
<>Change items: Blue fish 1 Add
<>Branch if Var [0039:catch fish] is 3
<>Change items: Yellow fish 1 Add
<>Branch if Var [0039:catch fish] is 4
<>Change items: Pink fish 1 Add
<>Branch if Var [0039:catch fish] is 5
<>Change items: Purple fish 1 Add
Also, note that, depending on how you want this event to happen, whether once, at a specific spot, through the use of a skill command, or what have you, it will have a few extra lines of code in it. Unless you want this code to happen just once, I recommend using a "Common Event." If you are not familiar with common events yet, they are a life saver. If you have any more questions concerning event scripting, I'll do my best to point you in the right direction.