Charas-Project
Off-Topic => Archive => Old Game Discussion => Topic started by: Quezarlay on November 03, 2005, 08:43:23 PM
-
I really nead someone to make this for me becuase I DON'T understan at all. I get confuse with all the swiches. Please can someone help me?
If someone can do it is perfect. If someone one to explain it to me that will do too. But I really nead this.
I will give the proper credit.
This tutorial is made by Fallen_Spades
http://www.gamingw.net/tutorials/268
-
Ah yes... Using switches...
After taking a good look at the tutoria lyou supplimented the tutorial didn't do a very good job at telling you what to really do. Who long have you been using RPGMaker anyway?
-
Like 3 years O_O and I never understand swiches.
-
3 years and don't understand switches?! I have like, erh... how long have I been registered here? Ah, I remember. I registered on my birthday, 25 of may. I downloaded it at the end of april. Since then, my knowledge on Rm2k/3 have been growing... and my knowledge on school going down...
-
Lol, I used the psx RPG Maker for like 2 years without knowing what a switch was :p. I always added an item/character/spell and had events triggered if the hero had them or not.
Anyway, I'll try to explain switches in a simple way, but I'm usually not the best at explaining things :(
A switch just has an ON and an OFF function. All switches start OFF. Through an event you can turn a switch ON.
A switches main goal is to determain if an event with run or not when triggered. To set up an event to run only if a switch is ON, all you have to do is find the 'preconditions' section in the top left corner of the event editor, click on the box next to swich, then select which switch its using.
Now the event will only run if that switch is ON.
Now to something a little more complex.
Each event has multiple pages. A page is basically differant layers of the event. However, only one page will run at a time. The LAST page is the page that will always be processed.
Now lets say you have two pages. If you set the second page to run only if a switch is ON, then the first page will run untill that switch is turned ON.
That may sound a little complicated, but really its not. Heres an example:
You have an event with two pages. Each page has the same character. The first page has the character say "get me a crown!", and the second page has him saying "did you get my crown yet?".
The second page however has a precondition that swich [crown], has to be ON. and at the end of the first page, theres an event turning switch [crown] ON.
When you talk to this character, he'll say "get me a crown!" since page 2 can't run without having switch [crown] ON. Now if you talk to him again, he'll say "did you get my crown yet?" since switch [crown] was turned on after the message on the first page.
Anyway, I hope that helped.
-
And by the way, this is in the wrong forum. Something like this should go in RPG Maker Programming or Tutorials.
And DB pretty much summed up what a switch is.
-
Thanks for explain it to me.
Can you or someone else go to this link and re make the tutorial? Step by step so I can understand it?
I get los in the cycle O_O and in the common events.
Please the idea in this tutorial is greate and I want to do it but it is too complicate I nead someone to do it step by step. ^_^ Please
http://www.gamingw.net/tutorials/268
-
Its a day/night script right? Here, I'll post a simpler one. The original tutorial was made by magnus989 from blade2k.net. I'm just editing a few parts to maybe make it a bit more easier for you to understand.
Before you read the tut, let me explain common events and cycling.
Common events - common events are events that aren't located on a map. Since they're not located on a map, they can be run from anywhere. This way the day/night system will run on all maps instead of just the map with the event on it. Common events are located in the Database (where you edit heroes, items, spells, ect). Theres a Tab labeled common events. This is where you have to build the day/night system.
Cycles - cycles are also known as loops, and thats probably whats labeled as in the event editor (on page 3). What a loop does is repeats the lines in it over and over. It'll basically keep the day/night system running.
First you need to go to the common events page and name it something that
has to do with day and night (day/night for example).Make it set under Parallel Process. Set it to run if a switch called Day/Night is ON.
In the events command box add a cycle/loop command.
<>Loop
<>
<>END Loop
Good.We need to use a loop so the event will keep going on and on.
Now we need to make a morning switch.Therefore you must go to chnge switch
and put a switch called morning in.Make it on set.Also you need to make another
switch called night,and set it on off set.By doing this when the loop resets whatever
you choose to put on night it will go off on morning.It should look like this.
<>LOOP
<>Change Switch:[0000]Morning-On Set. Note that the number beside the switch is
<>Change Switch:[0001]Night-Off Set whatever number you have the switch on.
<>END LOOP
Doing good so far?Okay we need a wait command.This will decide how long
the morning will last.I set my mornings to 30 seconds,but you can make it whatever you want.
Now here is the main part of the tutorial.On the maps that you want things to happen you need
to make the events happen under these switch conditions.(Sorry bad wording)
If you have a map of a castle or town and you want the background to change during the day you
will need to make an event and in the command box put Change Parralex BG to a Dawn picture
if it is morning.In the appearance switch make it appear under morning.By doing this the back ground
will change to morning when the morning switch is activated by the loop in the common events.
Also you will need to set a screen tone that looks like morning.Now make a new page.Make
the appearance switch on day.Chang the background to one of the morning pictures.Set the screen
tone to the normal level.(Everything at 100)Make a new page.Put in an
evening background and set the screen tone to something that looks like it is evening.Now make a
new page.Put in a night background.Set the screen tone where it looks kinda bluish.
You can also make Charas appear at certain times of day like at night make bats and day make birds.
To do this make an event and set the appearence swith on day and put a chara you want to see at
daytime.Do the same for night but make the appearence switch on night.
Anytime you want a place to change during the day or night make a copy of the event with
these steps and place it on the map you wish for them to happen.
Now that that's all cleared up we can go back to the common events and finish the thing that
triggers all of these events.If you forgot this is what the commands should look like so far.
<> LOOP
<>Change Switch:[0000]Morning-On Set
<>Change Switch:[0001]Night-Off Set
<>Wait: 30.0 s
<>
<>END LOOP
Now we need to make the day time.After the wait command out in switches day on set
and morning off set.
<>LOOP
<>Change Switch:[0000]Morning-On Set
<>Change Switch:[0001]Night-Off Set
<>Wait:30.0 s
<>Change Switch:[0003]Day-On Set
<>Change Switch:[0000]Morning-Off Set.
<>
<>END LOOP
By now you probably know how to use these commands in the common events so I'll
give you what the rest looks like.Here goes.
<>LOOP
<>Change Switch:[0000]Morning-On Set
<>Change Switch:[0001]Night-Off Set
<>Wait:30.0 s <--You can change this time if you want.
<>Change Switch:[0003]Day-On Set
<>Change Switch:[0000]Morning-Off Set.
<>Wait:100.0 s <--You can change this time if you want.
<>Change Switch:[0004]Evening-On Set.
<>Change Switch:[0003]Day-Off Set
<>Wait:30.0 s <--You can change this time if you want.
<>Change Switch:[0004]Evening-Off Set
<>Change Switch:[0001]Night-On Set
<>Wait:70.0 s <--You can change this time if you want.
<>
<>End LOOP
Now just stick in an event that you can't avoid at you starting position.Set it on Hero Touch
and in the event commands make it change switch to Morning On Set.Make a new page and make
the appearance switch on Morning.Set it to push key and leave everything else blank.
This should do it.The main reason I created this tutorial is when I used the
others they didn't work,or the screen would change from dark to light when I didn't want it to.
Some places I wanted the screen tone to stay normal but it didn't let it so I thought up this
tutorial.I hope it didn't confuse anyone.
By Magus989.
-
YOU ARE SUCH A PIE DragonBlaze!!!!!
It work O_O and I understod it! ^_^ You are the best!
Can I ask you to maka the same with a timer an someting that show the time like real time.
It is because I'm making a Harvest Moon game and I'm stuk with this things.
But you are the BEST!
It work I cant belive it!
I will give the credit for it to you and Magus989.
-
Hear that, DB? You're a pie! XDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
Good job, though. Nice to see someone willing to help others.
-
Making a timer. Easy enough:
Required: One timer (use either timer one or two, but you have to use the same timer in all instances)
Basically:
Loop:
"Con Branch" If timer =more then 24:00
Set timer = 1
Else handler
Timer+00:01
Wait 1.0
End Loop
This timer makes to to where 1 second in real life is one minute in game life. It's farily common. If you want a realisitic one, that's something else though. You'd need pictures and etc.
-
Yes, I nead a timer that work like a real one. ^_^
That says 1:00 am 1:20 am.
Someting like that ^_^
-
I use this tutorial to make the real timer but the timer don't run. Can someone prove it to see were I whent wrong? I really nead it.
http://rpgmaker2000.narod.ru/faq/timesystem.txt
-
Heh, you'll need pictures and crap for a real one, and I really don't feel like writing all the scripting.
Right now, just take the lazy way out and use mine. Untill you get used to scripting, then you should know how to make your own clock and you can ditch mine.
-
I didn't ditch it. It is just that it don't work for what I nead. I don't nead pictures because if you use the variable to tell the hour like this
Hour:
V[0013] : V[0012] : V[0011]
Calendar:
V[0007] : V[0008] : V[0009]
It is perfect.
I just nead someone to tell me what I did wrong because the one I use in the link is exelent but the time just don't move. O_O
-
This is were I'm experimenting.
-
Well, I waned to attach it so it will be easier but the site won't let me. O_O
-
I've always wanted to be called a pie :D
Right now charas has a bug or something that doesn't allow you to upload files. You'll have to upload it to a differant server such as imageshack or photobucket and show them via link.
I just nead someone to tell me what I did wrong because the one I use in the link is exelent but the time just don't move. O_O
You didn't do anything wrong. When variables are displayed in a message box, they don't change at all after the message box is opened. So if the variable is 1 when the message box pops up, the message box will show "1". If that variable changes while the message box is open, it will still show "1", in order for it to desplay the new time, you'll have to reopen the message box.
A real timer is possible, but you can't do it with the message system. Instead you will need picture files of the numbers 00 - 59. I recommend not using one because it will take a long time to make, and it may be very difficult to anyone who dosen't have a lot of experiance with rm2k/3. However, I always like to encourage people to try hard things like this, it's the only way to get better, well its one of the ways :p. Whether you want to use a message box or pictures is up to you, I'll try and explain how to make a real time clock, but I can't write the syntax off hand. If you don't understand it, I'll build the system and show you a few screenshots of how its put together.
-Make a new event in the common events, lets call it [CLOCK DISPLAY]
--Make this event a parallel process event with a switch as a trigger, lets call the swich [SHOW CLOCK]
--- Turn [SHOW CLOCK] ON when you want the clock to be desplayed.
-Now lets make 12 variables, these variables will be for the X and the Y possition of the picture files.
--When pictures are desplayed, they need an x and a y possition to be desplayed. the X is the horizontal position, and the y is the virtical position. You don't need variables to desplay the pictures, but its a lot easier in the long run, and you'll see why later.
-- Name the variables HourX, HourY, MinuteX, MinuteY, SecondX, SecondY, DayX, DayY, MonthX, MonthY, YearX, and YearY.
-- For now lets just worry about the hours. Set HourX to 160, and HourY to 120. (160, 120 is in the center of the screen.)
- Heres the long part, make a fork condition (may be called conditional branch, its located on the 3rd page of the event options). In the fork condition, you'll see a variable tab, check that box. Set the variable to your HOURS variable (I think its 0013 for you). Select Equal To, then enter "1" as a number. Also be sure that the box for the option "execute custom handler if condition is not met" is turned OFF.
-- Now add a line between the branch if.. and END lines by double clicking in between them.
-- Go to page 2 and select the show picture command.
--- Select the picture of "01" or "1" (whichever you chose).
--- Set the picture number to 10
--- Under where it says "display coordinants, select Variable Reference. Choose HourX for the top line, and HourY for the bottom line.
-- What you have now is that if your HOUR variable is 1, a 1 will be desplayed in the center of the screen. However, if its a differant Hour, then nothing will be desplayed.
-- To fix this, you will need to make another conditional branch after the END of the first one. Make this exactly the same, however triggering it if HOUR is equal to "1", have it trigger if it is equal to "2".
-- In that branch, show the picture "2" instead of "1", still use Hour X and HourY.
-- Repeat this Process for the values 1 - 12 (or 1 - 24 if you're not using AM and PM).
- For minutes its even longer, but the same idea.
--Set MinuteX to 165 or 170, and set MinuteY to 120.
--Make conditional branches for all 60 minutes and desplay their picture file in each appropriate branch.
-- Make the picture number 11 instead of 10, and use MinuteX and MinuteY instead of HourX and HourY.
- Repeat same steps for seconds, use picture number 12, set a value for SecondX and SecondY, and use those two variables to desplay the pics.
- Add ":"'s in between the numbers when your done.
- Be sure to put a WAIT command at the end, it will reduce lagging. Set the wait to 1 second.
That will desplay the time in real time, to adjust the possition of the clock, all you have to do is change the values of the X and Y variables instead of changing the values of all 150 branches.
This is very long, but the easiest way. There is also another way to do this though. All you would need is pictures of numbers 0 - 9. Instead of desplaying the full number, you would only desplay each digit at a time. The downside to this will be it will require more pictures and will probably lag the game a lot worse, and its more complicated. Heres how to split a 2 digit number into two seperate single digit numbers, you'll have to do it for every double digit number. I'll show minutes.
- Make a new common event, name it ValueSplit
- Have parallel process, and have it require [ShowClock] to run
-Set a variable [NumberSplit] to the value of the varaible [Minutes]
-Set a variable [1Digit] to [NumberSplit]
-Set a vairable [10Digit] to [NumberSplit]
-Got to variable options and select [1Digit], select the MOD function, and select 10
- MOD [10Digit] by 100
- Go to variable options, select [10Digit], select subtract, by variable [1Digit]
- Divide [10Digit] by 10.
Now [1Digit] will be the number in the 1's digit and [10digit] will be the number in the 10s digit. Use these variables in the branches instead. It'll still require a lot of conditional branches, but instead of 60 for minutes, you'll only need 20.
-
^
l
l
Exactly why I didn't want to take the time and write stuff.
Course... then again.... it would be niced to be called a pie.
-
I don't know how but I FIX it!! :D
Now I have a real timer and I can show it in the game with the variables now is runing, like I say before I don't know how I did it. ^_^
Now the problem is that even if I put the clock unlimite to use it only shows 2 time. WHAYYYY??
I waned to post the screens but it won't let me.
:(