Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Dynamic Tutorial Collection

These are Tutorials that I made for everyone, from beginners to advanced levels. Well, here ya go. Tell me if you like it. Think of it like a capcom aniversary CD, but good.;)

Advanced Time Tutorial

Code:
Advanced Time
--------------------------------------------------------------------------------------------------------------------
Another Tutorial by me, yup another
This will require intermediat + lvl of rmxp.
THis will show you how to make advanced time and date system, it also does a short day and night tutorial.
You can edit the code to make it rain on certian days or be a sandstorm on certian days. Its totally up to you.
You can also make it so that your quests start or end on certian dates, you can make deadlines for anything actually. This will all
rely on your inagination.

---------------------------------------------------------------------------------------------------------------------

First make a new common event and name it "Day_date_cp"
Next make it paralell to a switch.
Make two variables and call them Days and Months

Then enter these basic commands to create the simple day and night controls. These can work at any of your day specifacations that 
you have set for your games. Just change them to how long your days,  evenings,  and nights are going to be.
<>Contitional Branch Timer Below 6 Minutes and 0 Seconds
<>Tint Screen (0,0,-255,0) @200
<>Conditional Branch Timer Below 3 Minutes and 0 Seconds
<>Tint Screen: (-100,150,10,170) @200
<>
Else Handler
<>Conditional Branch Timer Below 0 Minutes and 1 Second
<>Timer Operation Start (12 Minutes and 0 Seconds)
<>Variable [001: Days] +=1
<>
End
<>
End
<>
Else Handler
<>
End

Now for the hard part, for this tutorial I wont do every month. This will show you how 
to do it yourself with some simple eventing methods.

#Note. The picture number for each picture dosent change, so dont go making a new picture number for every show picture event.
[CODE]
<>Conditional Branch: Variable [001: Days]== *How many days in your month*
<>Erase Picture *Picture number 
<>Show Picture *Picture Number* 'Picture for frist number in date here eg. the 1 in 10th* Upper-Left Pixel (550,75), (100%,100%), 255, Normal
<>Show Picture *Picture Number* 'Picture for second number date here eg. the 0 in 10th* Upper-Left Pixel (550,75), (100%,100%), 255, Normal
<>Show Picture *Picture Number* 'Picture of Day here eg: Sunday* Upper-Left Pixel (550,30), (100%,100%), 255, Normal
<>
Else Handler

*Keep putting the dates in order in the else handler of each other until you reach the beginning of the month. REMBER START AT THE 
HIGHEST NUMBER IN YOUR DATE AND WORK YOUR WAY DOWN!*
<>
End

After that put this small but of eventing to reset the days when it reaches the end of the month.


<>Conditional Branch: Variable [001: Days]== *How many days in your month*
<>Variable [001: Days] =1

<>
End

Next make another common event and name it "Month_cp"
Make it paralell to the same switch as the first common event

And put this action



<>Conditional Branch: Variable [002: Months]== *How many months in your year*
<>Show Picture *Picture Number*Month name here eg.January* Upper-Left Pixel (500,75), (100%,100%), 255, Normal
<>
Else handler
*Keep putting the months in order in the else handler of each other until you reach the beginning of the year. REMBER START AT THE
HIGHEST NUMBER IN YOUR DATE AND WORK YOUR WAY DOWN!*
<>
End




After that put this small but of eventing to reset the days when it reaches the end of the month.


<>Conditional Branch: Variable [002: Months]== *How many days in your year*
<>Variable [002: Months] =1

<>
End

After this then put a new event on your map with a paralell trigger on it.
Set your variables of months and days at 1 by putting this.
Code:
<>Variable [001: Days] =1
<>Variable [002: Months] =1

Then to initalize your date on screen, when the variables change so will the date.
Code:
<>Show Picture *Picture Number* 'first Month name here eg.January* Upper-Left Pixel (500,75), (100%,100%), 255, Normal
<>Show Picture *Picture Number* 'first Picture for frist number in date here eg. the 1 in 10th* Upper-Left Pixel (550,75), (100%,100%), 255, Normal
<>Show Picture *Picture Number* 'first Picture for second number date here eg. the 0 in 10th* Upper-Left Pixel (550,75), (100%,100%), 255, Normal
<>Show Picture *Picture Number* 'first Picture of Day here eg: Sunday* Upper-Left Pixel (550,30), (100%,100%), 255, Normal

Then turn on your switch to make all of the actions work

<>Switch [0001: MYswitch]=ON;

So when you should have somthing like:

Code:
<>Variable [001: Days] =1
<>Variable [002: Months] =1
<>Show Picture *Picture Number* 'first Month name here eg.January* Upper-Left Pixel (500,75), (100%,100%), 255, Normal
<>Show Picture *Picture Number* 'first Picture for frist number in date here eg. the 1 in 10th* Upper-Left Pixel (550,75), (100%,100%), 255, Normal
<>Show Picture *Picture Number* 'first Picture for second number date here eg. the 0 in 10th* Upper-Left Pixel (550,75), (100%,100%), 255, Normal
<>Show Picture *Picture Number* 'first Picture of Day here eg: Sunday* Upper-Left Pixel (550,30), (100%,100%), 255, Normal
<>Switch [0001: MYswitch]=ON;


Now to prevent this from happening everytime you enter that map, or just from initalizing the the varibles agian just create a new page.
On your new page you should see a checkbox that says Local Switch. Click it and set it to "A"
Go back to your first page and enter one more line to your existing code. REMBER ITS TO GO AT THE VERY END OF THE CODE ITSELF.

Local Switch: A= ON;


Your final first page code should be somthing in this general area:

Code:
<>Variable [001: Days] =1
<>Variable [002: Months] =1

Then to initalize your date on screen, when the variables change so will the date.

<>Show Picture *Picture Number* 'first Month name here eg.January* Upper-Left Pixel (500,75), (100%,100%), 255, Normal
<>Show Picture *Picture Number* 'first Picture for frist number in date here eg. the 1 in 10th* Upper-Left Pixel (550,75), (100%,100%), 255, Normal
<>Show Picture *Picture Number* 'first Picture for second number date here eg. the 0 in 10th* Upper-Left Pixel (550,75), (100%,100%), 255, Normal
<>Show Picture *Picture Number* 'first Picture of Day here eg: Sunday* Upper-Left Pixel (550,30), (100%,100%), 255, Normal


Then turn on your switch to make all of the actions work 

<>Switch [0001: MYswitch]=ON;

So when you should have somthing like:


<>Variable [001: Days] =1
<>Variable [002: Months] =1
<>Show Picture *Picture Number* 'first Month name here eg.January* Upper-Left Pixel (500,75), (100%,100%), 255, Normal
<>Show Picture *Picture Number* 'first Picture for frist number in date here eg. the 1 in 10th* Upper-Left Pixel (550,75), (100%,100%), 255, Normal
<>Show Picture *Picture Number* 'first Picture for second number date here eg. the 0 in 10th* Upper-Left Pixel (550,75), (100%,100%), 255, Normal
<>Show Picture *Picture Number* 'first Picture of Day here eg: Sunday* Upper-Left Pixel (550,30), (100%,100%), 255, Normal
<>Switch [0001: MYswitch]=ON;
Local Switch: A= ON;

To make it do things on certian days just add conditional branches that check the dates for your weather or your quest ends.

Example:

I make a character on my map and i want him to give my player a quest on the 1st of january and the first of january only.

So i just add a conditional branch that asks if the date is that and if its not then he does some other function, if it is then
the player gets to do my quest.

<>Conditional Branch: Variable [002: Months]==1 ///1st is january in my month list
<>Conditional Branch: Variable [001: Days]== 1 /// 1st is the 1st in my day list
*My quest stuff here
<>
end
<>
end

---------------------------------------------------------------------------------------------------------



If you followed the instructions carefully then this should work, if you didnt then do it over ^_^
ALso if you use the images for the tutorial plx give credit.

Pre-Made Images that I did myself can be download here.
http://www.esnips.com/doc/a776927f-d032-4d...5917b/Dates.zip

example:
http://i49.photobucket.com/albums/f251/julius17/ScreenShot044.jpg[/IMG]


[/code]

1.Metal Gear Solid Style Gameplay in RMXP [level: medium ]
Code:
First Guard:
This will require a 5 page operation.

Page 1:
On the first page put the officers with no gun equipped and enter the following code:
Make his movements custom: Left, Left, Left, Up, UP, Right, Right, Right 
*Note: The guard’s uniform can’t be an item or an acc, it must be a weapon or armor otherwise it would not work properly.
Make this a parallel process

<>Conditional Branch: Hero [hero name ] [guards uniform] equipped
<>
Else Handler
<>Variable: [001: Evade] Random (1...30)
<>Conditional Branch: Variable [001: Evade]= = 20
<>Conditional branch: Hero [ hero name] [ cardboard box] equipped
<>Variable: [002: Box Evasion] = Random (1..25)
<>Conditional Branch: Variable [002: cardboard evasion]= = 20
<>Play ME: ‘015-Mystery 01’ 100,100
<>Show Battle Animation [M]: This Event, [Emotion-!] 
<>Message: Hey who are you!
<>Change Equipped items: [hero name], weapon = (none)
<>Change Equipped items: [hero name], weapon = (what ever weapon you want*)
<>Enemy Encounter: Guards*3
<>Message: Turn on the alarm!
<>Switch: [001: Alarm] = ON
<>
Else Handler
<>Wait: 100 Frames
<>Show Battle Animation [M]: This Event, [Emotion-?]
<>Message: What is that cardboard box doing here?
<>Move Event:: This Event
:<> Face Player
<>Message: I could have sworn I saw it move, …….oh well
<>
: End
<>
Else Handler
<>Variable [001: Evade] = (1..30)
<>Conditional Branch: Variable [001: Evade] = = 30
<>Show Battle Animation [M]: This Event, [Emotion-!]
<>Message: Hey what are you doing over there, show yourself.
<>Enemy Encounter; Guard*3
<>Switch: [001: Alarm] = ON
<>
: End
<>
: End
<>
: Else Handler
<>
: End
<>
: End
<>Conditional Branch: This event is facing up
<>Local Switch: A = ON
<>
: End
<>







Page 2:

Use The same sprite as in the first page
His Movements should be what ever you want them to be but at some point he has to move up and wait for a period of time.
*Note: Make sure the prediction Local switch A=ON

Enter the following code:

<>Conditional Branch: Player is facing Right
<>Message: Don’t move!
<>Variable: [003: Stick up] = Random (1..5)
<>Conditional Branch: Variable [003: Stick up] = = 4
<>Local Switch: B = ON
<>
Else Handler
<>Play SE of your choice
<>Battle Animation: Item
<>Message: Stole: (*whatever you want the guard to drop) 
<>Change items: (*the item you chose) +1
<>Local Switch: C = ON
<>
End

*Now Repeat the same thing using the player facing left and up in the conditional branch.
Put them in the else handlers of each other
• The Local switch Operation should only be in the last one of these, in the else handler



Page 3:

*You should use the army guy firing for this one
His movements should be face down and have it repeating
The frequency should be at the highest and so should the speed
Make it a parallel process


The Code is as follows:


<>Show battle animation [M]: This Event, [Emotion-!]
<>Move Event:: This Eent
:<> Jump: +0, +0
<>Proceed With Movement
<>What are you trying to do!
<>Play SE: (*Your choice) I have machine guns and screams make sure there is a 3 frame pause between them or it will just sound like one big thing.*)
<>Wait: 20 Frames
<>Enemy Encounter: Guard*3
<>Switch: [001: Alarm] = ON
<>Play SE: (* your choice)
<>Local Switch: C = ON
<>








Page 4:

*The sprite should be the unequipped guard again 
The movement should be none for this one
Make sure the local switch C prediction is on for this page

The code is as Follows:


<>Message: Please spear me, I have kids!
<>Show Choices: Get out of here, Never You Scum!, Take Uniform
: [Get out of here] Handler
<>Message: You fool!
<>Enemy Encounter: Guard*3
<>Local Switch: A = OFF

<>Local Switch: B = OFF 
<>Local Switch: C = OFF
<>Message: There is an intruder!
<>Switch: [001: Alarm] = ON
<>
: [Never, you scum!] Handler
<>Play SE: (*Your choice)
Show Battle Animation [M]: This Event, [Gun Tech 4]
<>Erase Event
<>
: [Take uniform] Handler
<>Message: Please I would rather die!
<>Change Armor: [Guards Uniform] +1
<>Wait: 50 Frames
<>Local Switch: D = ON
<> 
: End
<>






Page 5:
The Naked Template sprite should be used for this
The movements should be “move away from heroâ€ÂÂ
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top