I am attempting to make a system where my character earns NPC followers by performing certain actions that cause the NPCs' belief, wonder, and fear of my player to increase. I want these three categories to decrease with time, though, so the player has to keep on performing actions to keep the NPCs faithful to them. So I figured I should set up an event system where the variables of belief, wonder, and fear decrease with time... but I also want to make it so that when action X is performed, they stop decreasing for a bit and stay steady, but after enough time has passed, it starts decreasing again.
Right now, I'm using a completely blank project just to see if I can make a working system and test this out. Here are the events I have set up:
- a square I walk on to give my character 20 points in each of the three categories (belief, wonder, and fear)
- a common event that drops the variables belief, wonder, and fear by one point after every two seconds (it obviously wouldn't be so quick in the game, I'm just testing and want to speed it up, haha). It also has a conditional branch that stops the variables from dropping when the switch for action X is on
- a square I walk on to trigger a switch for action X
- a parallel process event that begins running when the switch for action X is on. This event starts a timer that lasts one minute, and after the timer runs out, it turns the action X switch off, which tells the common event to start decreasing the variables again.
- and lastly, i have a parallel process event that a. turns on a switch called "decreasing" which is the condition switch for my common event and b. shows me a text box when the value of the variables drops to 17, and another text box when it drops to 10. I figured that would be the easiest way of telling whether or not the variables are actually changing... when I get the system figured out and try to implement it in my game, I'm going to have to figure out a way to show the player where the NPCs belief, wonder, and fear is at... but that's a worry for another thread.
This is what my common event looks like:
(I scrolled past the first few lines so I could show you the rest, because the first part of this event is just Conditional Branch: Variable [001: Fear/002: Wonder/003: Belief] == 0... I figured I needed a blank conditional branch for when the variables are at 0 so the event doesn't try to decrease a variable that's already at zero.)
This is the event that turns on my common event's condition switch and also shows me the textbox when the variable drops to a certain number:
This is the event that starts running when I step on the event that turns on the action x switch:
And I'm not gonna show you the events for the two squares that I step on because they're both just player touch event squares, and one of them sets all the variables to 20 while the other flips on the action x switch.
So I stepped on the square and got my 20 variable points, then stood and waited for a while and I did get the first textbox... waited some more and got the second textbox, so hurray, I think it's working! For some reason, I feel like it took way longer than it should have though... 20 frames is one second, right? It definitely took more than two seconds for the textboxes to pop up.
My issue is when I trigger action x. I get the timer that pops up in the righthand corner, but it stops at 59 seconds and immediately goes back to letting the variables decrease, instead of waiting a full minute and letting the variables stay at a standstill before continuing to decrease. What am I doing wrong? Also, I fear that I might be making this more complicated than it has to be... Also I am so sorry for this novel a post omg, I hope it doesn't deter you from helping me!