Winston 0 Posted February 23, 2015 (edited) Created a condition branch: Conditional Branch: Variable X == 1 Control Switches: [X] = ON Else Control Switches: [X] = OFF (If Variable X = 1, then Switch X should be ON). But for some reason, if variable X is more than 1, switch X is on. I want to make it so the switch is only ON when Variable X is EQUAL to 1 (not more or less). Edited February 23, 2015 by Winston Share this post Link to post Share on other sites
philteredkhaos 131 Posted February 23, 2015 can you post a screenshot of your event? We would be better equipped to help you with some visuals of the problem. Share this post Link to post Share on other sites
Winston 0 Posted February 23, 2015 There's the screenshots, hope it helps. Basically, I want the NPC to appear when the variable = 1 Share this post Link to post Share on other sites
Chareu 6 Posted February 23, 2015 I think you need to make a conditional branch for when the variable does not equal 1, which will then turn off the switch. Share this post Link to post Share on other sites
Winston 0 Posted February 23, 2015 I think you need to make a conditional branch for when the variable does not equal 1, which will then turn off the switch. Do you mean make another conditional branch on the same page? Like: Conditional Branch: Variable X does not equal 1 Control Switches: [X] = OFF And I get rid of the 'else' part? Share this post Link to post Share on other sites
Chareu 6 Posted February 23, 2015 I want to say yes, but I can't get it to work myself. Share this post Link to post Share on other sites
EternalShadow 28 Posted February 23, 2015 It's hard to follow with all of this blanked out, but there is a much simpler way of doing it. On the NPC page, just look below the switch condition - there's a variable condition. Use that instead of all of the conditional branching. P.S: That Paralell process is running 60 times a second, and likely isn't getting a chance to turn the switch before re-running. Share this post Link to post Share on other sites
Winston 0 Posted February 24, 2015 (edited) It's hard to follow with all of this blanked out, but there is a much simpler way of doing it. On the NPC page, just look below the switch condition - there's a variable condition. Use that instead of all of the conditional branching. P.S: That Paralell process is running 60 times a second, and likely isn't getting a chance to turn the switch before re-running. The variable condition doesn't work because I want the variable to EQUAL to one. The page condition only allows it to be 1 or above. Also, the blanked out part is just text. Edited February 24, 2015 by Winston Share this post Link to post Share on other sites
StrayBalloon 19 Posted February 24, 2015 Could you offer a little more context to the situation? What causes Variable X to have a value of 1? Why can't we use conditionals that checks for variable X being greater then one? Are you using variable X as a means for game progression? The more we know, the better we can help you. Also EternalShadow gave good insight on the finicky nature of parallel processes. Share this post Link to post Share on other sites
Winston 0 Posted February 24, 2015 The Variable is for time: morning (X=0), noon (X=1) and night (X=2). Doing certain things increases the variable by 1 e.g. going to work. I want the character to only appear during noon. I'm really confused as to why it isn't working. It seems logically correct doesn't it? Share this post Link to post Share on other sites
Galv 1,387 Posted February 24, 2015 Created a condition branch: Conditional Branch: Variable X == 1 Control Switches: [X] = ON Else Control Switches: [X] = OFF (If Variable X = 1, then Switch X should be ON). But for some reason, if variable X is more than 1, switch X is on. I want to make it so the switch is only ON when Variable X is EQUAL to 1 (not more or less). Your statement reads If variable x is equal to 1 Then turn switch x ON Else (meaning, if variable x equals anything ELSE besides 1 (ie. more than 1)) then turn switch x OFF Maybe you could use the variable in your condition rather than check a variable to change a switch Share this post Link to post Share on other sites
Winston 0 Posted February 24, 2015 (edited) Created a condition branch: Conditional Branch: Variable X == 1 Control Switches: [X] = ON Else Control Switches: [X] = OFF (If Variable X = 1, then Switch X should be ON). But for some reason, if variable X is more than 1, switch X is on. I want to make it so the switch is only ON when Variable X is EQUAL to 1 (not more or less). Your statement reads If variable x is equal to 1 Then turn switch x ON Else (meaning, if variable x equals anything ELSE besides 1 (ie. more than 1)) then turn switch x OFF Maybe you could use the variable in your condition rather than check a variable to change a switch Yeh that's what I intended for it to say, but it's not working. I can't use the variable in the condition because I want the character sprite to appear as well, so I need to have them on different event pages. Edited February 24, 2015 by Winston Share this post Link to post Share on other sites
Galv 1,387 Posted February 24, 2015 Oh, I misread your problem with the conditional branch. Your way seems logically correct but does not appear a good way to do it. What I mean by use the variable in the condition is in the event that has the graphic, the page's condition (that has the graphic) you could set to appear if variable x is greater or equal to 1. Then on an event page after that, set to to disappear if that variable is equal to or greater than 2. The switch change depending on variable wouldnt be needed then. (I see this idea was mentioned above as well, but didn't mention the new page for the variable being 2 or greater) 1 Share this post Link to post Share on other sites