Riddles, Switches and Variables

Discussion in 'RPG Maker MV' started by EvieEvangelion, Sep 17, 2016.

  1. EvieEvangelion

    EvieEvangelion Villager Member

    Messages:
    17
    Likes Received:
    0
    Location:
    Canada
    First Language:
    English
    Arg i had this working and some how fixing one of the other problems with it broke a different part! 


    Ok so i have a quest where the player has to answer 2 riddles before a door will open. I it so that the correct answer adds 1 to the variable 'riddle' and i have the door set to only open with that variable is set at 2. i also have it so that when the variable is set a 1 the door is half opened. When i answer the one riddle, the door moves to half open(like it should) and then when i go and answer the second riddle, it resets the door to closed when it should be opened all the way. I made sure that both riddles are set up to +1 on the variable so i know it's not that. I can''t figure out why it's resetting the variable. 
     
    #1
  2. Black Alchemy Games

    Black Alchemy Games Villager Member

    Messages:
    12
    Likes Received:
    2
    Location:
    United Kingdom
    First Language:
    English
    Do you have any events that are setting or resetting your riddle variable to 0?


    So it should be like this: ?

    • have event which sets riddle variable initially to 0
    • riddle 1 correct +1 (now 1)to riddle. door event = half open
    • riddle 2 correct +1 (now 2)to riddle door event fully open
     
    #2
  3. Andar

    Andar Veteran Veteran

    Messages:
    27,713
    Likes Received:
    6,227
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    Please show us screenshots of your event pages, then we can tell you what went wrong there.
     
    #3
  4. BehemothRPG

    BehemothRPG Villager Member

    Messages:
    20
    Likes Received:
    3
    Location:
    Luxembourg
    First Language:
    German
    Hm well you could try to use switches instead of variables since you're using boolean values in that case:


    switch 1 Riddle1Solved OFF


    switch 2 Riddle2Solved OFF


    create a door event with 3 event pages (in that order):


    page 1 (no condition, door is closed, text says solve the riddles first) -> hero will solve the first riddle, setting switch 1 to ON


    page 2 (switch 1 as condition, door is half open, text says one more riddle to go) -> hero will solve the second riddle, setting switch 2 to ON


    page 3 (both switches 1 and 2 as condition, door is open)


    This will just work properly when the order of the riddles is predefined, but maybe that is the case anyway ;)
     
    Last edited by a moderator: Sep 17, 2016
    #4
    consolcwby likes this.
  5. EvieEvangelion

    EvieEvangelion Villager Member

    Messages:
    17
    Likes Received:
    0
    Location:
    Canada
    First Language:
    English
    I've added an event that resets the riddle variable to 0 (its the one that tells you about the riddles) but it's still messing up, and the door won't open past half.

    I'll add all that i have at the moment now 


    This one resets the values to 0


    2016-09-16 (2).png













    These are the riddles 

    2016-09-16 (1).png 2016-09-16 (6).png



    And these are the pages for the door

    2016-09-16 (3).png 2016-09-16 (4).png 2016-09-16 (5).png


    I was trying to have it set up so that the riddles could be done in any order that's why i changed from switches to variables. i had switches and it did work then. 

    2016-09-16.png
     
    #5
  6. BehemothRPG

    BehemothRPG Villager Member

    Messages:
    20
    Likes Received:
    3
    Location:
    Luxembourg
    First Language:
    German
    Be aware that, when the self switch on the first page of the door event is set to A, it will skip the second page because you used the same condition for both pages. Instead of using if statements, use the "variable" condition on the left side of the event.


    Page 1 (closed) no condition


    Page 2 (half open) Variable 0008 >= 1


    Page 3 (open) Variable 0008 >= 2
     
    Last edited by a moderator: Sep 17, 2016
    #6
  7. EvieEvangelion

    EvieEvangelion Villager Member

    Messages:
    17
    Likes Received:
    0
    Location:
    Canada
    First Language:
    English
    OH! I think the self switch might have been the issue then! i missed that thank you so much~!


    yes it works now, only think is it transfers the play to the next room without them having to go up to the door, any ideas?(Just added another page that wasn't a parallel)
     
    Last edited by a moderator: Sep 17, 2016
    #7
  8. Waterguy

    Waterguy Veteran Veteran

    Messages:
    1,164
    Likes Received:
    250
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    ---pressed to send by accident---
     
    Last edited by a moderator: Sep 17, 2016
    #8
  9. Waterguy

    Waterguy Veteran Veteran

    Messages:
    1,164
    Likes Received:
    250
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    I see a bunch of problems...


    First, your events have no second page to stop them from being answered again and activating the door with just one riddle twice. I suggest a switch if you insist in the riddles being reset by the first event, or self-switches if not.


    Second, your door's second page is set to bellow character.


    Third, the third page uses the same self-switch as the second.


    I personally would make the text not reset the variable, make the riddles activate a self-switch when completed so they wouldn't change the variable anymore, and make the door have four to five pages: one the closed door, one set to variable at 1 in parallel process of it half-opening and activating self-switch A, one set to self-switch A of it half-open that does nothing (maybe a message if checked tops), one of variable at 2 that is also parallel process that finishes opening and either teleports the character out or activates self-switch B, and if you go for the fifth page (suggested if you want to let the player revisit there) one activated by self-switch B of the open door that teleports to activate on touch.


    But that's your game.
     
    #9
  10. BehemothRPG

    BehemothRPG Villager Member

    Messages:
    20
    Likes Received:
    3
    Location:
    Luxembourg
    First Language:
    German
    Glad I could help out :)  Yep indeed with a parallel process it will trigger the transfer immediately but you already figured out to set the event as touch, in that case the "below characters" is fine too.  I agree Waterguy that I would switch the text event too so that the variable isn't touched anymore afterwards, what happens when you decide to solve the two riddles but instead of walking up the floor you read the initial riddle text again?
     
    #10
  11. Waterguy

    Waterguy Veteran Veteran

    Messages:
    1,164
    Likes Received:
    250
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    If, being a parallel process, it always changed after ending there would be no problem with it being bellow... but the problem is, it only changes when the if is confirmed, meaning the player can walk everywhere, even over the event. Anywhere else it could be no problem, but... it is the door.
     
    #11
  12. Andar

    Andar Veteran Veteran

    Messages:
    27,713
    Likes Received:
    6,227
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    @EvieEvangelion Your door event is much too complex.


    Here is a better way:


    first page, closed door, action button, no condition, no code, nothing


    second page, half door, conditions to variable riddle = 1 or above, action button, no code


    third page, open door, condition to variable riddle = 2 or above), transfer command, action button


    finished.


    Absolutely no switches or parallels neccessary.


    You only have to make sure that the riddle-variable is increased by each riddle only once (prevent a riddle to be answered twice to get the two from one riddle)
     
    #12
  13. Waterguy

    Waterguy Veteran Veteran

    Messages:
    1,164
    Likes Received:
    250
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    @Andar That is a simpler solution if that was all she wanted, but it seems like she also wants to make the door move visibly and make a sound from her events...


    I like the idea, but you are right, it is for when she is more advanced.
     
    #13
  14. Andar

    Andar Veteran Veteran

    Messages:
    27,713
    Likes Received:
    6,227
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    Not from what she had in the screenshots - the sound is only on the transfer page, and that could still be used on page three.
     
    #14
  15. Waterguy

    Waterguy Veteran Veteran

    Messages:
    1,164
    Likes Received:
    250
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    Uh, you are right... I guess I miss-saw (yeah, I know, not a real word), thought that since the sound is named "open" it was being used for the sound of the door opening.


    I overthought it then.


    Simpler solution is more than fit then.


    Oh, and @EvieEvangelion


    Be careful about the page order. No matter the conditions of the others, the page more to the right with the conditions filled will be the one to activate.


    A problem in your event I forgot to mention earlier, but saw right away, it seemed the one you wanted to be the last was the second page.
     
    #15
    EvieEvangelion likes this.

Share This Page