Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics

Cookie Cutter MZ - Hunger/Thirst System

A project template for RPG Maker MZ. Copy and paste it into your own project to utilize a custom evented hunger system! · By Caz

Player Gathering/Drinking Water from Water Tiles

A topic by Apocalypticat created 85 days ago Views: 46 Replies: 2
Viewing posts 1 to 2

So, I have added this  eating/drinking system and everything is working perfectly fine (thank you for such a great template!) For the context of my game, the player cannot carry water/drinkables in their inventory, and I would like them to be able to "activate" or "select" water from water sources (all water tiles are marked through region or terrain IDs) which they then immediately drink from.

Is there any way that I can have the player "activate" or "select" the water to cause them to essentially "drink" it?

Thanks in advance!


Yep absolutely! You'll need to make a new common event which is always checking whether the player is pressing whatever your "confirm" button is. If the player is pressing confirm, make four different conditional branches to see if the player is facing up, down, left or right. 

Then you'll need to make two variables that check the player's X and Y coordinates. In the conditional branch for if the player is facing up, subtract -1 from the Y variable. For down, +1 to Y. For left, -1 to X. For right, -1 to Y.

Now make another variable that checks the region of those coordinates. If the variable matches the same number as the water region, increase the Current Thirst variable.

I hope that made sense, haha! Let me know if it's confusing like this and I'll try and screenshot some events

Thank you so much! LOL - total noob here, so here I go to try and implement this :P

Deleted 84 days ago