[RMVX ACE] THE NEED FOR SLEEP.

Posts

Pages: 1
Hello all. So I have replaced Mana for fatigue. Over time it drains and replenishes when you sleep. What I want to do is when your fatigue reaches zero, the screen goes black, you pop up at a random place, and you lose all your gold in your inventory. What I need help with is how would I make an event to acknowledge that you have zero fatigue (mana). I would prefer to make it an event and not a script if possible. I do not know how to make scripts so I try to stay away haha.

Thank you for reading :)
Edit: Gah! I need to be more patient... Sorry guys I figured it out. I caved in and made my own scripted. Did a conditional branch, script, and just did mp=0. Haha so simple. Thank you again for reading.
Edit: So now I have a new problem unfortunately. I test run the game and it starts to run the process of my guy passing out over and over again and his fatigue (mp) isn't = to zero. Here is my event. It is a parallel process.
@>Control Varibles: (0001:Current$) = Gold
@>Conditional Branch: Script: faigue=0
@>Play SE: 'Cry2', 100, 50
@>Fadeout Screen
@>Wait: 60 frame(s)
@>Change Gold: -Variable (0001:Current$)
@>Change MP: (???), +25
@>Fadein Screen
@>
: Else
@>
: Branch End
@>

Can anyone tell me what I did wrong? I'm very very sorry for the back and forth edits here. I wasn't actually sure if I should edit or make a new post for my new problem. Thank you for reading and for any help.
Cap_H
DIGITAL IDENTITY CRISIS
6625
So fatigue is lost over time or does it work like regular mana? Or encounter meter? You may want to check on some other games with similar features.

And on the second line you wrote faigue instead of fatigue. You don't teleport on a random place with this one, do you (Is it part of fatigue script?)?
Marrend
Guardian of the Description Thread
21781
Short version: You need to store MP into the variable that the Conditional Branch uses.

Long version: I have no idea what the "fatigue" function does, but, if you're checking against a game-variable instead, from the looks of things, it doesn't actually store the character's MP. That's why it keeps looping. The game-variables always start at 0. So, when it checks to see that the variable that is supposed to store MP is 0, it will return true, and will always return true, because it never changes.

*Edit: Alternatively, you could most likely use the script "$game_actors[1].mp == 0" for the Conditional Branch. The number in the brackets would depend on the ID of the character, though, and I'm largely presuming that this is a one-character game.

*Edit2: Also, yeah, nowhere in that code would it teleport you to a random location. The player would "wake up" exactly in the same place he/she/it/they/whatever was "knocked out". I'm not quite sure what the solution would be to that right now. One question occurs to me outright, though. Would the player's position on the new map also be random, or would the player's position depend on what map is being teleported to?

*Edit3: Dairgaaz, I just saw it. In the Conditional Branch, you placed "fatigue = 0". Unless something else is going on, what this does is put the value of "0" into a local-variable called "fatigue". It doesn't actually check anything! Which is probably the real reason why this keeps looping!
Thanks for the comments. Apologies, internet problems has prevented me from coming right back on. I didn't add the teleporting part of the event yet just because I'm trying to get other parts of the event working so I'm not to worried about that part yet.
@Cap_H I typed the event out so any misspelling is just my fault haha. I just went under terms and changed mana to fatigue and not in the script editor. The loss of mana over time is pretty much how poison is. Every however many steps you lose some mana.
@Marrend As of the moment your edit 3 is starting to make sense. So by default how would I make a parallel process constantly look to see if my mana is zero? Again, not worried about the teleporting part.
Marrend
Guardian of the Description Thread
21781
author=shazamham
@Marrend As of the moment your edit 3 is starting to make sense. So by default how would I make a parallel process constantly look to see if my mana is zero? Again, not worried about the teleporting part.

One way is to use Control Variables, set it to equal the MP of the character (do you need to know how to do this?), then use a Conditional Branch checking to see if the value of that variable is zero. The alternate way to do it is use a Conditional Branch with...

$game_actors[1].mp == 0

...this in the "Script" option-box.

Note: This is largely assuming there's only one character with which to check MP against. If there is more than one character, well, we'll cross that bridge if it's needed!
I chose the first option and it works. Thank you marrend :)
Pages: 1