Jump to content
Sign in to follow this  
Winston

What am I doing wrong?

Recommended Posts



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 by Winston

Share this post


Link to post
Share on other sites

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

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

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

I want to say yes, but I can't get it to work myself.  

Share this post


Link to post
Share on other sites

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

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 by Winston

Share this post


Link to post
Share on other sites

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

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

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

 

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 by Winston

Share this post


Link to post
Share on other sites

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)

  • Like 1

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted