Event System Support (expert users only)

Status
Not open for further replies.

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,108
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
I'd be interested to see how you have it set up at the moment.


You could do something using 5 variables. One would tell you which number you were inputting next (first, second, third, fourth) and the other four would keep the buttons pressed, using nested conditions based on the value of the first number. After you input the fourth number, check all of them to make sure they're correct, and if they're not play the buzzer and set the 'counter' variable back to 1.


Slightly more complicated but fewer variables needed (only 1) would be something like this:


- on start, set variable to [] (you'll need to use the Control Variables - Script for all of this)


- on pressing a button, Call Script to $game_variables[x].push(value of the button pressed)


- if Script: $game_variables[x].size == 4 do the test below


- if Script: $game_variables[x].eql? [5,9,2,3] do unlock, else play buzzer, set variable to []
 
Last edited by a moderator:

Quigon

electric boogaloo
Veteran
Joined
Mar 17, 2012
Messages
1,982
Reaction score
954
First Language
English
Primarily Uses
N/A
I'll try out your second way first. Are the if Scripts at the last two steps parts in conditional branches or just script calls?

Oh hey, I actually get a game_interpreter error when I click a button with $game_variables[6].push(whichever number). It says 'Undefined method 'push' for 0:FixNum'.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,108
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
It's probably because you didn't do the first step. The variable should be initialized to [] as soon as the puzzle begins, so it changes from a FixNum to an Array.

So just add this

Script: $game_variables[6] = []to an event that will run as soon as the puzzle begins, and that error should go away.Here's the correct format for the rest (I didn't do it before as I didn't have my maker open yet and didn't want to guess at the terms). I'll use value to indicate where you should put the value of the button pressed.

Code:
Script: $game_variables[6].push(value)Conditional Branch: Script: $game_variables[6].size == 4  Conditional Branch: Script: $game_variables[6].eql? [5,9,2,3]    Comment: do unlock stuff  Else    Play SE: 'Buzzer1', 80, 100    Script: $game_variables[6] = []  Branch EndBranch End
You do NOT want either of these running as a parallel process. You need to call each of them at certain times - the first gets called only when the puzzle first starts up, and the second gets called only when a button is pressed and you've retrieved the value for that button.
 
Last edited by a moderator:

Quigon

electric boogaloo
Veteran
Joined
Mar 17, 2012
Messages
1,982
Reaction score
954
First Language
English
Primarily Uses
N/A
Thank you for clarifying, the error has disappeared. So I followed your steps in each button event so that they look like this (every number having a different value of course)



I also use the $game_variables[6] = [] before pressing any buttons. However, now whenever I press a button with the mouse, nothing happens. Before calling $game_variables[6] = []

the event runs accordingly, although obviously I still get the error.

EDIT: Just noticed the else actions are in the wrong place, will change that up and see what happens.

EDIT2: Annnnd I set up the initial event wrong. Looks like that was the problem. Will test it out.

EDIT3: Thank you so much, looks like that's it working now. Had no idea you could use variables like that, it's good to learn new things! (also that'll totally help later with some other puzzles, so thank you!)
 
Last edited by a moderator:

Logan

Villager
Member
Joined
Apr 8, 2013
Messages
21
Reaction score
1
First Language
Portuguese
Primarily Uses
Well, i require some assistance in an important matter.

Currently, i'm working on an SMT fan-game, and as a good SMT title, it must have a moon phase system, for this system to work, it would require the count of steps in-game, like in a battle, the problem is that, how am i suposed to reset the whole system after it rereaches full moon?
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
I am unsure how you'd count the steps in a battle - because it's an entirely different scene (plus the characters don't really move).


You'd simply use a variable to keep track of the total amount of steps, and reset to 0 whenever it is full moon in your game.
 

Logan

Villager
Member
Joined
Apr 8, 2013
Messages
21
Reaction score
1
First Language
Portuguese
Primarily Uses
Sorry for the misunderstanding, the example i was talking was that before the transition to a random battle, before said battle, the player would require to walk x amount of steps, after the battle the count would reset, sorry, i guess i got a bit hurried with the example.

Yes, i'm aware it would require a variable, and to reset it, but how would i reset the step count to 0, i've tried but i dunno how.
 

Logan

Villager
Member
Joined
Apr 8, 2013
Messages
21
Reaction score
1
First Language
Portuguese
Primarily Uses
No, that's not what i ment, sorry... let's just put the battle example aside,

What i realy want to happend must occur in the map, and it's suposed to loop from a new moon phase (not full, another mistake) to another new moon phase by making the moon go through various phases, it goes showing pictures referent to the phase, and like i said, the phase changes as the character walks,

The problem is that since it depends on  the step count, it keeps going up, and even if i set the variable to 0, it just stays at new moon, what should i do in order to keep it looping
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,108
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
If it's an event that has the image, you'd need multiple event pages - one for each phase, conditioned by a variable containing the number of steps. When you increment the variable, see if it's higher than that for the full moon, and if it is, reset it to 0.
 

Anime Girl

Beginner Artist (I'm here to storm the world) :D
Veteran
Joined
Nov 27, 2012
Messages
55
Reaction score
6
First Language
English, French
Primarily Uses
Hi,

I started eventing a menu, but I kinda got stuck.

I'm almost done the eventing but the pictures for the menu are not showing

and I don't know how to link the amount of money the player has to the menu.

Anime Girl
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,108
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
You need to show us what you've done before we can help you :) Give us screenshots that actually show the commands.


Also, your profile says you use VX. ARE you using VX for this project, or Ace?
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
Wow.


I told you to learn from my project. Not to copy and paste events from it (you even copied the comments I put in there for myself, really?). Just wow. No wonder it isn't working; you don't know what you're doing if you're just copying my work. What worked for my project, doesn't work for your project.


Also you're posting in the VX Ace forum, not the VX forum.
 
Last edited by a moderator:

Dragonduke

Villager
Member
Joined
Jun 23, 2012
Messages
22
Reaction score
1
First Language
English
Primarily Uses
I have a question of whether or not it is possible to have an NPC at the front of your door.  When the player gets there and talks to the NPC.  Through eventing, can you get the NPC to turn and walk through the door ahead of the player. as in Something like:

text:  Yes, that will do nicely, follow me inside. 

Then set move route, this event( NPC)

turn up

1 step forward.

set move route

player 1 step forward

and then the transfer begins?  Right now all I can get is the NPC to step aside and allow the player to go through the door and transfer.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,108
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
Do you have a visible event for your door? As in, do you see it open before the NPC and player will step through?


If not:


- set a move route on the NPC - make him move to the door event (turn on THROUGH if he's not able to go ONTO the door event), wait a few frames, then set opacity to 0


- set a move route on the player - wait a few frames (for the NPC to start moving), make the player move to the door, wait a few frames, then transfer


If you CAN see the door:


- set a move route on the NPC - make him move to the door (wait until complete)


- set a move route on the door to open (just create a quick event, then copy the event commands and paste it into your NPC event, and change the move route to refer to the door event) (wait until complete)


- set a move route on the NPC - make him move onto the door event (turn on THROUGH), wait a few frames, then set opacity to 0 (wait until complete)


- set a move route on the player - move to the door, wait a few frames, then transfer


You'll also want to set a switch which conditions a blank page on the event, so it's not there when you come back again (unless you WANT him to be there). If the player can't move onto the door event in either case, make sure the NPC is set to THROUGH ON at the end of the move route, so it's not blocking the player.


Note, this question is not about an "event SYSTEM" and should have been posted in its own thread.
 
Last edited by a moderator:

Dragonduke

Villager
Member
Joined
Jun 23, 2012
Messages
22
Reaction score
1
First Language
English
Primarily Uses
Thank you so much for the answer Shaz and your kindness to a newbie.  Sorry for the misplaced question.
 

ShinGamix

DS Style 4Ever!
Veteran
Joined
Mar 18, 2012
Messages
3,905
Reaction score
451
First Language
April Fools
Primarily Uses
N/A
How would I go about building an ActRaiser style Map?

Monster Lair Event-Need to spawn monsters and be an enemy too so it could be sealed

Monsters-bats and stuff 

Citizens for the monster to swoop up

Towns that grow?

???
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,108
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
Please provide more detail than that. Don't assume everyone knows what you're talking about. As it is, they look like 4 completely different requests that could all be done easily via events, apart from the last one, which could be done with Tsukihime's Tile Swap script.
 

ShinGamix

DS Style 4Ever!
Veteran
Joined
Mar 18, 2012
Messages
3,905
Reaction score
451
First Language
April Fools
Primarily Uses
N/A
that sounds like the right way to start off. thanks Shaz!
 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.
time for a new avatar :)

Forum statistics

Threads
106,018
Messages
1,018,359
Members
137,803
Latest member
andrewcole
Top