Hi. I've been using the Alcoholism and Drinking tutorial to allow my characters to get drunk when in a pub. I've already had to work around being unable to have the alcohol as a consumable item by making an event that only allows you to drink at a table. Now I know that the table event works, but as the character consumes alcohol he doesn't get drunk. The problem must lie my Common Event because the table event definately works, so here's the code I've been using;
I have four different Conditional Branches in this Common Event, each with a different variable number (e.g. 50, 100 e.t.c) for the different stages of drunkness. The variable itself is set to increase when you have a drink at the table. What am I missing? Any help would be much appreciated.
Err....Isn't there a dialogue box where you set the (non)consumable option? You probably just have to change it to a parallel process event; these run all the time, and are useful for keeping track of changes. You can hide them virtually anywhere, or disguised as anything you have an image for. You need to create a Common Event (CE) that adds the +1 to the drunkeness variable (say, D5) . Go to the item editing tab for your beverage and put your +1 event in the "call common event", and set it to "consumable". Every time you use (and consume) the drink, it calls the common event D5 which adds 1 to the drunk variable. This is vaguely mentioned in Step 4, I believe. So, to review:
1. a CE that adds +1 to a variable 2. beer item-consumable-calls the CE that adds +1 to beer variable 3. a parallel process event somewhere (you can make it a lantern or person) that keeps track of the numbers and implements changes accordingly. Keep in mind that you'll have to put this pretty much everywhere you can get drunk. Do not delete this, or you will be AF'd.
I think you just mis-read it; mind you, from what I've seen, those tutorials aren't exactly great.
This post has been edited by Alt_Jack: Jun 29 2011, 07:11 PM
Quackadoos, if you post in the wrong forum you can always report your own thread to bring it in the attention of moderators.
Thanks for that. I though it might be under report but I daren't click it in case I accidently reported myself.
Alt_Jack, thanks for the help there, I've been finding these tutorials really hard to follow. Turns out I just needed to have parallel process in there like you said. Thanks very much, I swear I'll get the hang of this one day.
Quackadoos, if you post in the wrong forum you can always report your own thread to bring it in the attention of moderators.
Thanks for that. I though it might be under report but I daren't click it in case I accidently reported myself. Alt_Jack, thanks for the help there, I've been finding these tutorials really hard to follow. Turns out I just needed to have parallel process in there like you said. Thanks very much, I swear I'll get the hang of this one day.
Jack is an amazing eventer. I thought I was good, but this guy knows what he's doing. Hang out with Jack for awhile and you'll be able to event like a master in no time.
Jack is an amazing eventer. I thought I was good, but this guy knows what he's doing. Hang out with Jack for awhile and you'll be able to event like a master in no time.
I'm just not one of those people who lets their ego get ahead of them; I think it slows down progress, because if you think your work is the greatest, it doesn't motivate you to create bigger and better things. Besides, if I really wanted to, I could refer to myself as an "award-winning computer game element designer". lol Now there's a pick-up line!
Group: Member
Posts: 12
Type: None
RM Skill: Beginner
I'm so glad I happened to run across this forum because I had the exact same problem. The very first tutorial I decided to try out on this site was the alcoholism and drinking tutorial, and as the tutorial currently stands at the time of writing this, it doesn't work.
And I am definately up for trying out Alt_Jack's proposed challenge and my chance to self-proclaimed "pro" status. I've done some pretty amazing things with Microsoft Excel functions, and eventing in RMVX is very similar.
-the parallell process that keeps track of the drinks. You need this, otherwise it won't work.
- the items that call their respective CE, and add a number to the drinks variable. basically, all they say is: control variables-(add) X to variable 007:drinks.
-do not use CEs for the parallell process, as this is both lazy and stupid (and probably won't work as well)
-the parallell process should have condition branches (3 or 4) that read like this: condition branch: if variable 007-:drinks= >= (greater than/equal to) X ->change screen tone: (I don't use this, so go nuts)
-stick the parallell process event on a wall and choose a lamp sprite for it. Make sure parallel process is on, and also tick off walking animation ON, stepping animation ON and direction fix ON. It makes the torch flicker.
-to test it, make an NPC that says the following: show choices: Reset, variable display when Reset-control variable 7 drinks = (set) = 0 (this resets the variable back to 0 ) when variable display: text: current number of drinks: \. \v[7]
this displays the current value of variable number 7 (or whatever your drinks variable is)
The last part about the NPC is, at least in my opinion, a very useful trick when working with variables, especially if you're using a system that changes a variable behind-the-scenes, so to speak. It helps you keep track, and is updated every time you talk to the NPC.
This post has been edited by Alt_Jack: Jul 2 2011, 11:31 PM
-the parallell process that keeps track of the drinks. You need this, otherwise it won't work.
- the items that call their respective CE, and add a number to the drinks variable. basically, all they say is: control variables-(add) X to variable 007:drinks.
-do not use CEs for the parallell process, as this is both lazy and stupid (and probably won't work as well)
-the parallell process should have condition branches (3 or 4) that read like this: condition branch: if variable 007-:drinks= >= (greater than/equal to) X ->change screen tone: (I don't use this, so go nuts)
-stick the parallell process event on a wall and choose a lamp sprite for it. Make sure parallel process is on, and also tick off walking animation ON, stepping animation ON and direction fix ON. It makes the torch flicker.
-to test it, make an NPC that says the following: show choices: Reset, variable display when Reset-control variable 7 drinks = (set) = 0 (this resets the variable back to 0 ) when variable display: text: current number of drinks: \. \v[7]
this displays the current value of variable number 7 (or whatever your drinks variable is)
The last part about the NPC is, at least in my opinion, a very useful trick when working with variables, especially if you're using a system that changes a variable behind-the-scenes, so to speak. It helps you keep track, and is updated every time you talk to the NPC.
damn jack, im jelous, i leave for a bit and u take all the credit of being a good eventer , i need to logon more xD
p.s. sorry for going off topic a bit there xD wont happen again mods.
__________________________
My Userbars
Rated pg-13 part of signiture
Scientist A: "A single sperm has 37.5MB of DNA information in it. That means a normal ejaculation represents a data transfer of 1,587.5TB." Scientist B: Too bad ejaculate has terrible packet loss Scientist C:but the transfer does have a lot of redundancy