Hey everyone again xD
I was studying some methods from the Interpreter class, but I can't understand what are that @parameteres[0], ...[1] and ...[2], etc <.<
Does someone know any tutorial or something about this class? I really need it (:
Appreciate :haha:
@parameters are the parameters for each command. You can think of each command as a method which must be passed a certain set of parameters. For example, the parameters for something like Add Item would be [int, int], the first number for the ID of the item, the second number for the amount. What is in the parameters changes for each command according to its function. I doubt there's a good tutorial anywhere on this, but you can always look at the code for each command (Interpreter 3-7) and figure out what each element in parameters does.
Well, I thought about that 2, but at 'add_item' there are 3 parameters... (on value variable at the script)
Maybe the last one is the variable?
I say this because at the event add_item there is the id, the value of the amount and the variable...
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
# Add / remove the right amount of items
$game_party.gain_item(@parameters[0], value)
@parameters for the add item command:
[0] - item ID
[1] - operation (0 for increase, 1 for decrease)
[2] - type (0 for constant, 1 for variable)
[3] - operand (number for constant, or variable ID for variable
I was just giving a theoretical example because I didn't have RMXP up. But if you want to find something, just look through the Interpreter class and figure it out.
Lol, that sound nice to me xD and has its logic (:
I tried to figure it out, but each of these variables change for each type of events or not? (Now im thinking they are always the same xD)
Thanks a lot ^^
They are simply the options you enter for that particular event command in the RMXP interface, and the order would be similar. Of course, the comments should shed some light on what parameters exactly do.
In my version (portuguese one) there aren't elucidative comments there xD, that's why I've made this topic as well^^
Anyway, I got the main point now (:
Thanks both