ProjektCyphur 0 Posted May 24, 2015 Greetings community. I do not post much, but I read a lot. Whenever I am stuck, this is my go to place. I hope I have posted in the right place. Truth be told, I am not 100% in which category this topic should fall. On to the post. I am currently working on a "ghost hunting" game, and my core mechanic for the game is as such. When the player enters the "haunted" area, they use a Flashlight, which, would have a passive state (From Yanfly's Passive States) that drains mana every few steps. That is the easy part. Unfortunately, I can read most coding languages but I can only write basically. What I don't know, is how to have the Passive mana drain, only work when in the haunted area, however, the BIGGEST issue I am facing, is this: When the player runs out of Battery life, they start to take "Fear damage" and their health slowly drains in place of mana. Question, is how can I have the Health drain active, ONLY if the player has 0 Mana. I'd like it to turn on at 0 Mana and should the player pick up and use a Battery, the health drain will turn off. Also, how can I have these passives active, only on selected maps? Any feedback would be great, thanks. Share this post Link to post Share on other sites
Lord Vectra 414 Posted May 24, 2015 I know how to do it through events in a common event. Let's get it set up. Make a common event Name it Make it parallel process(NOT autorun) Once that is done, you need 2 variables. Var1 = Actor's MAP ID Var2 = Actor's MP Before I continue, let me tell you how to set a Var to a actor's MAP ID and MP(skip if you already know) Go to Control Variable Go to the operand section Go to game data Go to the right and click on the 3 dots Go to Other and the bottom and MAP ID should be the 1st choice. If you're looking for a persons MP Go to Control Variable Go to the operand section Go to game data Go to the right and click on the 3 dots Go to Actor MP Should be the 4th choice Let's say you want this active on MAP 1 This is how the common event will look @>Conditional Branch: Variable [0001: Map ID] == 1 @>Conditional Branch: Variable [0002: # of MP] == 0 @>Change State: Entire Party, - [MP drain] @>Change State: Entire Party, + [HP drain @> : Else @>Change State: Entire Party, + [MP Drain] @>Change State: Entire Party, - [HP Drain] @> : Branch End @> : Branch End @> If you want more Map ID's just copy and paste that on the same common event. Any Questions? Share this post Link to post Share on other sites
ProjektCyphur 0 Posted May 24, 2015 Thank you for such a quick reply! I was playing around with it last night, into the wee hours, I was up till 8th trying to figure things out. I didn't put the Mana Drain on a comment event, I put it as a Passive State using Yanfly's Passives. Your comment event looks like it'll do the trick. I have an issue though. I was using a comment event to switch from MP drain to HP drain. (I am on my tablet, so I don't have pictures to show, so I hope I can explain. I set up a common event, set it to parallel defined a variable (playerHealth) to be equal to actor1's MP ran a condictional branch that checks if playerHealth is equal to 0. If it is, apply state HP drain. This never works. It will not apply the state when MP gets to 0. Share this post Link to post Share on other sites
Lord Vectra 414 Posted May 24, 2015 Does your actor have MP regeneration? If not, I have no idea because it works for me. Are you sure it looks like this... @>Control Variables: [0001: Map ID] = Map ID @>Control Variables: [0002: # of MP] = [Actor 1]'s MP @>Conditional Branch: Variable [0001: Map ID] == 1 @>Conditional Branch: Variable [0002: # of MP] == 0 @>Change State: Entire Party, - [MP drain] @>Change State: Entire Party, + [HP drain @> : Else @>Change State: Entire Party, + [MP Drain] @>Change State: Entire Party, - [HP Drain] @> : Branch End @> : Branch End @> Share this post Link to post Share on other sites
ProjektCyphur 0 Posted May 25, 2015 My original looks like that without the Map ID. I'm at my pic now, so I am going to give it a try. Share this post Link to post Share on other sites
ProjektCyphur 0 Posted May 25, 2015 So, I just tried exacall what you had in your last post, nothing. I don't even get the mana drain I should clarify, the only difference I have is the map ID is set to 5, when I got to map 5, nothing happens. No mana drain, no health drain. Share this post Link to post Share on other sites
Lord Vectra 414 Posted May 25, 2015 (edited) Are you saying the states aren't appearing or they are, but they're not working? Edited May 25, 2015 by Vectra Share this post Link to post Share on other sites
ProjektCyphur 0 Posted May 25, 2015 Dumb me. I was just leaving it as a common event. I created an invisible event that runs as a parallel and calls the common event. It works now. Exactly the way I wanted to. I was headed the right direction, but I don't think I would have figured it out without your help. Thank you, very much. I really appreciate it. I'm making this game for my girlfriend and she is going to love this mech They states weren't even appearing, but once I created a parallel event that calls the common event you made, on the map I wanted it on, it worked just fine Share this post Link to post Share on other sites
Lord Vectra 414 Posted May 25, 2015 Okay, good to hear Share this post Link to post Share on other sites