Riddles, Switches and Variables

EvieEvangelion

Villager
Member
Joined
Sep 14, 2016
Messages
17
Reaction score
0
First Language
English
Primarily Uses
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. 
 
Joined
Jun 16, 2016
Messages
12
Reaction score
2
First Language
English
Primarily Uses
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
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,668
First Language
German
Primarily Uses
RMMV
Please show us screenshots of your event pages, then we can tell you what went wrong there.
 

BehemothRPG

Villager
Member
Joined
Sep 3, 2016
Messages
20
Reaction score
3
First Language
German
Primarily Uses
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:

EvieEvangelion

Villager
Member
Joined
Sep 14, 2016
Messages
17
Reaction score
0
First Language
English
Primarily Uses
Do you have any events that are setting or resetting your riddle variable to 0?
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.

Please show us screenshots of your event pages, then we can tell you what went wrong there.
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).png2016-09-16 (6).png



And these are the pages for the door

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


Hm well you could try to use switches instead of variables since you're using boolean values in that case:
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
 

BehemothRPG

Villager
Member
Joined
Sep 3, 2016
Messages
20
Reaction score
3
First Language
German
Primarily Uses
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:

EvieEvangelion

Villager
Member
Joined
Sep 14, 2016
Messages
17
Reaction score
0
First Language
English
Primarily Uses
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
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:

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,643
Reaction score
420
First Language
Portuguese
Primarily Uses
RMMV
---pressed to send by accident---
 
Last edited by a moderator:

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,643
Reaction score
420
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.
 

BehemothRPG

Villager
Member
Joined
Sep 3, 2016
Messages
20
Reaction score
3
First Language
German
Primarily Uses
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?
 

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,643
Reaction score
420
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.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,668
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)
 

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,643
Reaction score
420
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.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,668
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.
 

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,643
Reaction score
420
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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,977
Members
137,563
Latest member
cexojow
Top