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.

Water Gauge

Hello there,
I was wondering if someone could help me make a script that makes a new stat bar in a way. I want a bar(gauge) on the map for water, if you can make it run on steps that would be great, i want it to slowly go down as the player is walking through the desert. so yeah i would also like to make it have a switch to turn it on and off, i dont want it on all the time, only in the desert areas. and if possible could you somehow make an item able to restore some of the water gauge. i was thinking like haveing it run out after maybe 150 steps or so. when the gauge runs out you start loosing HP(all party members). but you cant die from this. just have it stop at 1 HP.

thanx
 
I came so close to your delima, using only events, and I ran into one problem...
That is that a common event runs every frame instead of every step...

So, it is possible with events if you have a timer rather than a step counter.

I have one step counter idea, but that would make it so it counts every step instead of ones on specific tiles...
 
Well, here was my idea, make it so a control variable event adds the amount of the terrain tag given to the desert each step, but then the problem is it reads it each frame and not step, so it is possible with a timer I assume.

Also, is that ichigo in your avatar?
 
Thats either a custom ichigo or hollow ichigo I figure. but your way is good, but I think he could use an event that uses a variable to read steps, and every time its 1 up, it subtracts 1 from the variable that makes the bar. so its like this, when variable a is greater than variable a, subtract 1 from variable b when variable c is 5 (terrain tag). thats what you would do to get it to do it every step. :)
 
yeah it's ichigo, i dont know if its custom made or not, i just found it on google lol.
i am so confuzed with the whole event thing, could you set it up and take a screenshot of it so i can just basically copy it, at this rate im gonna end up giving up on this lol.. im not an expert on eventing....
also you said something about the bar, if you want or if it will make things better and easier i made a bar/gauge and split up the graphics so i could add then to my game as pictures.
i split them up 2 different ways download both to see which would be easier to use.
here is setup #1
http://files-upload.com/files/433072/Water Gauge.rar

and here is setup #2
http://files-upload.com/files/433075/Water Gauge 2.rar

hope it helps, and thanx for your help.
 
well, instead of subtract, it could add, and once it reaches a value of X number of steps, it erases the existing picture and draws the new picture, which is the gauge at a different level, then continue this process until its at the empty level, then you just make it so it erases that variable, and starts adding to a new one, which once it reaches, oh say 10, then it subtracts so much from the health of the entire party, and resets the variable so it counts back up to ten, to execute the process again untl the party dies.

Quite simple, but it keeps reading the terrain tag each frame instead of step, so it doesn't work out to well, so you can do it per X many frames, instead of steps...

Well, I JUST NOW thought of a way to count the steps, which is setup a process so that it doesn't add the terrain every frame, and that it refers to map X and map Y, which if the two values are the same as the last frame, then it does NOT add to the variable which counts the terrain tags.

YAY PROBLEM SOLVED!

Lemme put it into event commands, and you owe me!
:D
 
YES!
I have done it!

So, instead of explaining it, I added it to a new little demo project, just copy-pasta the events and items and such.

The ONLY thing that I changed that were not default:

Terrain tag

I suggest looking through it, and finding out how the event system works, so you can customize it, I might make a quick tutorial tomarrow for it, but not now.

http://www.megaupload.com/?d=BV8OEIDU


Can get confusing...
 
actually that works great,

thank you for the help with this.

*edit* - actually i have a question now, this system works great, but i have one problem, i use the mode 7 script and the kgc maploop script and it still looks and works fine, but once the map loops once the water gauge doesnt go down anymore.. can you help me figure out a way to do this. its weird cause after it loops it still counts the steps so i dont know what to do. here's a picture, dont know if it helps anything..

thanx, hope you can help me..
 
well i dont use the loop feature in mode07 itself but yeah i noticed alot of things get messed up, but i dont know how else to make this work then.
have you played breath of fire 3 if you have then i want to basically copy the desert part. if you havent played it then what im doing is making it so you have to travel through this desert and as you walk it starts to turn to day, and when it day you camp until night and after 3 days you end up at the right destination depending on which direction you're going, if that makes sense.. lol and right now everything works and looks good but i found only 2 bugs with my system, the water gauge doesnt go down after the map loops and if i open up the menu screen and exit out of it, the screen's tint goes back to normal, but i just decided that i would disable the menu while in the desert and i added a new feature that when you press the menu button it will ask if you would like to make camp, and that all works, so now yeah just the water gauge... would just be a pain to take out mode07 and KGC Maploop now.. if you understand...

so i was thinking, is there any way we could mod what we have so far into checking the total steps once you enter the desert cause it wont be at 0 and then once 25-30 steps are added to the step counter then you loose a part of the water gauge?

sorry if that doesnt make any sense, im not very good at explaining things...
 
yea, just change the conditional branches values.
it should be at zero when it starts in the desert...

Is the terrain tag for the desert the only terrain tag of that value?

That would effect it...

I guess I should go and get mode 7 and see what your talking about...
 

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