Is it possible to create an event that counts every time it triggered? For example, I want to create a chest with a puzzle, with a content xx pts, but, to get that you must answer the question. If you are right at the first try, you can have the full pts, and if you are wrong, you will get nothing, but the chest still not opened. The next time you answer the question, the content of the chest will be decreased. Can rmmv do something like that?
Counting event for each trigger in RMMV ?
RPG Maker MV Supportnot on default, but very do able with events in some ways though:
grey chest (start (just an example, edit if you like or to improve))
control variable xx = 10 (max points, addjust how you want)
text, what question you want to ask!
show choices, 1, 2, 3, 4
when 1 (wrong answer)
variable x -= 1
when 2 (wrong answer)
variable x -= 1
when 3 (correct answer)
because of correct answer, use a condition brance here
if: variable xx = 10
selswitch A = ON (gold chest?)
else
if variable xx = 9
if variable xx > = 7
selfswitch B = ON (silver chest
else
you get the point from here.
this is only 1 methode to switch from A, B, C, D (4 golor chest)
if its just 1 chest, you can do the same as above, but instead of switches,
you can do the loot direct.
if you get teh golden chest (hard questions) you can loot it directly,
if its a rndomize questions to get a different chest (depending on the answers)
you can do similair above.
that is just a quick and rough example though.
you can also do +1 if you want to start from 0, if there is multiple questions,
but make sure, you use a loop/break loop and jump to result.
which can be done to more answers you have correct, the better the loot,
but that is entirely up to you.
adjust and improve where you see fit 🙂
grey chest (start (just an example, edit if you like or to improve))
control variable xx = 10 (max points, addjust how you want)
text, what question you want to ask!
show choices, 1, 2, 3, 4
when 1 (wrong answer)
variable x -= 1
when 2 (wrong answer)
variable x -= 1
when 3 (correct answer)
because of correct answer, use a condition brance here
if: variable xx = 10
selswitch A = ON (gold chest?)
else
if variable xx = 9
if variable xx > = 7
selfswitch B = ON (silver chest
else
you get the point from here.
this is only 1 methode to switch from A, B, C, D (4 golor chest)
if its just 1 chest, you can do the same as above, but instead of switches,
you can do the loot direct.
if you get teh golden chest (hard questions) you can loot it directly,
if its a rndomize questions to get a different chest (depending on the answers)
you can do similair above.
that is just a quick and rough example though.
you can also do +1 if you want to start from 0, if there is multiple questions,
but make sure, you use a loop/break loop and jump to result.
which can be done to more answers you have correct, the better the loot,
but that is entirely up to you.
adjust and improve where you see fit 🙂
didn't know you can use only < = x, but its a cleaner way as well, but you probably want
to start with a closed chest untill a answered correctly, but those are basicly 2 methodes.
might be better ways, and specially more complex ones 🙂
if you are new, use ct_bolt way, if you know what you do, you can combine mine with ct_bolt
to improve it nicely, if you want it more complex, kknow the engine nicely (above avarage)
because alot can be done if you know it and alot of things are capeable 🙂
to start with a closed chest untill a answered correctly, but those are basicly 2 methodes.
might be better ways, and specially more complex ones 🙂
if you are new, use ct_bolt way, if you know what you do, you can combine mine with ct_bolt
to improve it nicely, if you want it more complex, kknow the engine nicely (above avarage)
because alot can be done if you know it and alot of things are capeable 🙂
I also got one possible way, but i got Ninjad =).
Code:
◆Text:None, Window, Bottom
: :What is 3 + 3 ?
◆Show Choices:3, 1, 9, 6 (Window, Right, -, -)
:When 3
◆Control Variables:#0032 Variable for Chest1 += 1
◆
:When 1
◆Control Variables:#0032 Variable for Chest1 += 1
◆
:When 9
◆Control Variables:#0032 Variable for Chest1 += 1
◆
:When 6
◆Control Self Switch:B = ON
◆
:When Cancel
◆Exit Event Processing
◆
:End
◆If:Self Switch B is ON
◆Play SE:Chest1 (90, 100, 0)
◆Set Movement Route:This Event (Wait)
: :◇Direction Fix OFF
: :◇Turn Left
: :◇Wait:3 frames
: :◇Turn Right
: :◇Wait:3 frames
◆If:Variable for Chest1 = 0
◆Change Gold:+ 100
◆Text:None, Window, Bottom
: :100\G were found!
◆
:End
◆If:Variable for Chest1 = 1
◆Change Gold:+ 80
◆Text:None, Window, Bottom
: :80\G were found!
◆
:End
◆If:Variable for Chest1 = 2
◆Change Gold:+ 50
◆Text:None, Window, Bottom
: :50\G were found!
◆
:End
◆If:Variable for Chest1 ≥ 3
◆Change Gold:+ 20
◆Text:None, Window, Bottom
: :20\G were found!
◆
:End
◆Control Self Switch:A = ON
◆
:Else
◆Text:None, Window, Bottom
: :You answered wrong.
: :Times the Question were answered wrong: \V[32]
◆
:End
Original thread: https://forums.rpgmakerweb.com/threads/counting-event-for-each-trigger-in-rmmv.124441/