I have a few questions about using meta for certain purposes.
Posted: September 28th, 2016, 3:51 am
Alright so I made a topic on the general forum asking a dumb question which was answered very quickly and I really appreciate that. Well, little did I know that...I knew very, very little about meta, apparently.
I mean, I know enough to have made full quest metas and bots for certain things, but now I'm bored of that and want to get into some crazier stuff. I want to learn how all the expressions work and how to use them to the maximum.
Okay, starting out...how would I make a very simple rock-paper-scissors mini-game within meta? In my head it seems very simple; I just need a few states and a few variables to work with.
But...what? How do I manipulate the variable functions, exactly? I know about the "randint[2]" function but I have no earthly clue how to use it. It says there are two parameters that determine minimum and maximum of a random number but what is the proper format? "randit[1-3]"? "randit[1 3]"? Furthermore, once it makes a number how do I print it in chat or make states that are called based on what that number is?
What I want to do is basically make one variable for the "computer player's choice"--a value between 1 and 3 (rock, paper or scissors)--that is picked when a player says a certain command. Maybe "go" or something. Then the meta waits for the player to say their choice: rock, paper or scissors. Then the meta will react and give its response BASED ON the RANDOM VARIABLE created earlier. So, let's say the player says "rock" and the random variable's value was 1 (rock). The meta would say "Rock. It's a tie." If the player said paper and the variable was 1, the meta might say "Rock. You win." And lastly, if the player said scissors and the variable was still 1: "Rock. You lose." And so on and so forth.
I realize that rock-paper-scissors seems like a bad and completely arbitrary example, but I feel that it works well as a beginner exercise in understanding the inner workings of meta variables/expressions and how to utilize them effectively. I want to eventually make better projects than simple little mini-games, but in order to do so I need to know exactly how this stuff works. I have googled all over but am overwhelmed either by the lack of specific info or the abundance of info I'm not exactly looking for.
If anybody has any ideas or advice I would be SUPER grateful. I am definitely not looking for someone to do the work for me as I wouldn't learn a thing from it. I just want to know how I might be able to use variables/expressions to create a simple rock-paper-scissors mini-game and I should be able to go solo from there.
Thank you!
I mean, I know enough to have made full quest metas and bots for certain things, but now I'm bored of that and want to get into some crazier stuff. I want to learn how all the expressions work and how to use them to the maximum.
Okay, starting out...how would I make a very simple rock-paper-scissors mini-game within meta? In my head it seems very simple; I just need a few states and a few variables to work with.
But...what? How do I manipulate the variable functions, exactly? I know about the "randint[2]" function but I have no earthly clue how to use it. It says there are two parameters that determine minimum and maximum of a random number but what is the proper format? "randit[1-3]"? "randit[1 3]"? Furthermore, once it makes a number how do I print it in chat or make states that are called based on what that number is?
What I want to do is basically make one variable for the "computer player's choice"--a value between 1 and 3 (rock, paper or scissors)--that is picked when a player says a certain command. Maybe "go" or something. Then the meta waits for the player to say their choice: rock, paper or scissors. Then the meta will react and give its response BASED ON the RANDOM VARIABLE created earlier. So, let's say the player says "rock" and the random variable's value was 1 (rock). The meta would say "Rock. It's a tie." If the player said paper and the variable was 1, the meta might say "Rock. You win." And lastly, if the player said scissors and the variable was still 1: "Rock. You lose." And so on and so forth.
I realize that rock-paper-scissors seems like a bad and completely arbitrary example, but I feel that it works well as a beginner exercise in understanding the inner workings of meta variables/expressions and how to utilize them effectively. I want to eventually make better projects than simple little mini-games, but in order to do so I need to know exactly how this stuff works. I have googled all over but am overwhelmed either by the lack of specific info or the abundance of info I'm not exactly looking for.
If anybody has any ideas or advice I would be SUPER grateful. I am definitely not looking for someone to do the work for me as I wouldn't learn a thing from it. I just want to know how I might be able to use variables/expressions to create a simple rock-paper-scissors mini-game and I should be able to go solo from there.
Thank you!