Tutorial Hunger Thirst Sleep System Part 2 (Eventing in the Maker) – Advanced Learners

03 Dez
Tutorial Hunger Thirst Sleep System Part 2 (Eventing in the Maker) – Advanced Learners

ACHTUNG: Für alle die des Englischen nicht so mächtig sind habe ich es hier noch einmal auf Deutsch hochgeladen:


Difficulty: Schwierigkeitsgrad4

The first thing you should do is to import your HUD and your bars in your maker with the resource manager if you didn’t save it already in your pictures folder:

Ashampoo_Snap_2012.12.03_21h45m31s_038_Resource Manager

First of all we need to make a common event with the following settings: We’ll call this common event later.


Now we will set the Predefinitions for our system: the first thing we’ll set are the maximum deficits:

Ashampoo_Snap_2012.12.03_20h57m04s_001_Control Variables Why -160? You remember that our bars are 160 pixels long. If our bars are full the picture is set to position X:0 and Y: 0 If the bars are empty then they must be 160 pixel more left. The left part of our coordinate system is minus. Because of that -160.

Repeat that for thirst and sleep:


Because we want to behave the three bars differently we need to set three more variables for the steps (for hunger, thirst and sleep).

Ashampoo_Snap_2012.12.03_21h01m05s_004_Control VariablesRepeat that for thirst and sleep.


Now we can put in our grafics. Important is that the higher the picture number the higher is the layer of the picture. Because of that we need to put the HUD of the upper most layer (in this case 4):

Ashampoo_Snap_2012.12.03_21h06m51s_006_Show PictureWith the position X:0 and Y:0 the pictures will be in the upper left corner. Repeat that for the other three pictures. Remember to give each of them a new number. The HUD picture must have the highest number.


The first common event is now finished. And we can move on with the second with the following settings:


Now we have to setup how our bars will behave. With each step the hunger, thirst and sleep needs will increase. Because of that we set the variable difference hunger on the value of the steps:

Ashampoo_Snap_2012.12.03_21h10m26s_008_Control VariablesAshampoo_Snap_2012.12.03_22h14m30s_039_Game Data

Of that variable we must subtract the steps the player has made:

Ashampoo_Snap_2012.12.03_21h11m13s_009_Control Variables

Because each bar should behave different we’ll devide the variable through a different figure for hunger, thirst and sleep. (in this case 4)

Ashampoo_Snap_2012.12.03_21h11m29s_010_Control Variables

Our system needs to have the variable fixed in another variable because of that we’ll create the variable Hunger2. Otherwise our system won’t work properly.

Ashampoo_Snap_2012.12.03_21h17m18s_011_Control Variables

In this step we will subtract the variable Difference hunger of the variable Hunger:

Ashampoo_Snap_2012.12.03_21h17m29s_012_Control Variables

Now it should look like so:


Repeat that for thirst and sleep.


Remember to divide the through different numbers.

Now our pictures should be able to move so we can setup this:

Ashampoo_Snap_2012.12.03_21h24m22s_018_Move Picture We name a variable Y for the Y value. Because it will be 0 there is now need to give that variable a value. You can only name it and put it in for the Y value. Repeat that for thirst and sleep as well:


Now we need to ensure that the varables won’t exeed their limit (upper and under):

Ashampoo_Snap_2012.12.03_21h28m42s_020_Conditional Branch

Now click the free line inside the conditonal branch an insert the following:

Ashampoo_Snap_2012.12.03_21h28m50s_021_Control Variables

Repieat that for thirst and sleep.

Now we make this conditional branch again for the lower part:

Ashampoo_Snap_2012.12.03_21h30m56s_022_Conditional Branch

Ashampoo_Snap_2012.12.03_21h31m07s_023_Control Variables

Repeat that again for thirst and sleep.

This should look like so.


Now we are nearly finished with the second common event. We only need to tell the maker what should happen when the bar is empty (in our case -160 our deficite max.)

Ashampoo_Snap_2012.12.03_21h35m02s_025_Conditional Branch If our hunger is less or equal to our deficite maximum we’ll die.


If you like you can insert a message, this message should be above the Game Over command.

Ashampoo_Snap_2012.12.03_21h35m14s_026_Show Text

Repeat that for thirst and sleep:


And that’s it for this common event. Now we have only left to activate the switch no. 1 and to call our predefinition common event.

Make on the map where you like to start the hunger thirst and sleep system a new event: on the first page:

Set this page on autorun.

Ashampoo_Snap_2012.12.03_21h38m08s_028_Control Switches

Ashampoo_Snap_2012.12.03_21h38m21s_029_Call Common Event

Ashampoo_Snap_2012.12.03_21h38m33s_030_Control Self Switch This self switch switches to the secon page.

Ashampoo_Snap_2012.12.03_21h38m56s_031_Edit Event - ID-001Ashampoo_Snap_2012.12.03_21h39m06s_032_Edit Event - ID-001This page must have the trigger of Action button and as a condition the self switch A.

Now our Hud will function.

But we still need items to refill our storage. This we will make in the third and last part of that tutorial.


Hinterlasse einen Kommentar

Verfasst von - 3. Dezember 2012 in Tutorials


Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

Du kommentierst mit Deinem Abmelden / Ändern )


Du kommentierst mit Deinem Twitter-Konto. Abmelden / Ändern )


Du kommentierst mit Deinem Facebook-Konto. Abmelden / Ändern )

Google+ Foto

Du kommentierst mit Deinem Google+-Konto. Abmelden / Ändern )

Verbinde mit %s

%d Bloggern gefällt das: