The RPG Maker Resource Kit

RMRK RPG Maker Creation => General Tutorials and Eventing => RPG Maker General => Tutorials Database => Topic started by: Irock on August 22, 2007, 09:09:44 PM

Title: Random messages tutorial
Post by: Irock on August 22, 2007, 09:09:44 PM
Random Messages Tutorial
Ever wanted to have characters say random messages in your game? Well, in this tutorial, you will learn how to do so. It's very simple. Just follow these simple steps, and your game will have random messages in no time! Remmeber, the wording may be different for different RPG Maker XP versions.

[spoiler=Tutorial](https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg250.imageshack.us%2Fimg250%2F5504%2F30992270av7.jpg&hash=f819093be29db8cb4c77be57264a4727bfe2d993)
We're going to start out with the event page. Select your sprite, and it should look something like this.

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg214.imageshack.us%2Fimg214%2F497%2F31547568ud3.jpg&hash=4644b80a269ba5c46dfdf66db4729b08d2a65514)
Let's click on "Change Variable," in the event command list. This is located in the first tab.

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg211.imageshack.us%2Fimg211%2F5349%2F10948604qw3.jpg&hash=a393a4d0da331aabb0493c43d21c304fc227eafe)
We'll need to set up our variable. We can use one variable for all messages. Let's name it 'messages." THe naming doesn't really matter, but it's always good to name your variables according to the purpose.
We need to have a number randomly selected, so set how many different messages you want possible for your event. (it counts zero as a number) I set it to four different numbers, 0, 1, 2, and 3.

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg251.imageshack.us%2Fimg251%2F7302%2F64024240za5.jpg&hash=8b741052c9c5a52c8922c629d332ce4657718c33)
Now, under the variable, let's click on "forks condition." This is located under the first tab.

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg503.imageshack.us%2Fimg503%2F2269%2F58127460iy8.jpg&hash=989b9d2bacadfbf15d7a80251b9e8a06ca268b7f)
We need to have one of these for every random number possible, but let's make one at a time. Select the variable, and the number. We need to start with 0.

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg210.imageshack.us%2Fimg210%2F3870%2F33155068on0.jpg&hash=1293ca5c4d5b891e4afba229374b89d839e6139a)
Now that our first fork condition has been created, let's put the first possible message right here.

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg209.imageshack.us%2Fimg209%2F5138%2F53413216kd5.jpg&hash=63eaf6d1a756ae7fa2e382049a01e8ce5208c0fa)
Define what the message is, then hit OK.

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg441.imageshack.us%2Fimg441%2F7307%2F40026244pa3.jpg&hash=262a6217d6039e5335aa0d8cc3a4ebdddfec6920)
Now, under "else case," let's set up another fork condition.

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg212.imageshack.us%2Fimg212%2F8631%2F59034510kv5.jpg&hash=1001968c6a42f5ad99d7903b6a5a77bd6987d9e6)
Use the same variable, but increase the number by one.

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg521.imageshack.us%2Fimg521%2F4402%2F10fq2.jpg&hash=bdfb30f0e166dbb33ab93d028693ae4bfc39c0e3)
Continue doing this until you have one for every possible number. In this case we have 0, 1, 2, and 3. Don't forget to put a different message in each fork condition.

Now we have random messages!
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg201.imageshack.us%2Fimg201%2F2584%2F11pj5.jpg&hash=d24b31b0212b96380dab966b4cac12fb310df5e0)
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg207.imageshack.us%2Fimg207%2F3706%2F12wu7.jpg&hash=b53dc039b3d0ce77c7d729ee365e428ab7618dce)
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg213.imageshack.us%2Fimg213%2F4140%2F13un4.jpg&hash=aed572c565509c004ad8a9ad69538087085def7e)
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg337.imageshack.us%2Fimg337%2F2615%2F14ne1.jpg&hash=be60ba43ae0564a7c99bc89bf115498f1b670eb3)[/spoiler]
Title: Re: Random messages tutorial
Post by: Kokowam on August 22, 2007, 09:28:49 PM
Lol nice. But what's wrong with your RMXP? It says "same 0"....
Title: Re: Random messages tutorial
Post by: modern algebra on August 22, 2007, 09:59:07 PM
different translation. PK maybe? I'm not sure. This is a usefult tutorial. Good job Irock.
Title: Re: Random messages tutorial
Post by: Irock on August 22, 2007, 10:00:57 PM
I'm pretty sure I'm using legal. ?_?
Title: Re: Random messages tutorial
Post by: modern algebra on August 22, 2007, 10:10:24 PM
Odd. I definitely have a different translation.
Title: Re: Random messages tutorial
Post by: Kokowam on August 22, 2007, 10:40:07 PM
Same. Maybe it's because he's on Vista (LOL)
Title: Re: Random messages tutorial
Post by: Irock on August 29, 2007, 05:12:58 PM
Oh well, it works.