Status
Not open for further replies.

Mercedes90

Veteran
Veteran
Joined
May 7, 2021
Messages
66
Reaction score
9
First Language
English
Primarily Uses
RMMV
I know there's another thread on how to do this, but I have already read the solution for it on that thread, and it was all about setting up a "contact list to 'call' other actors", except that it's just another way of dialogue rather than an actual in-game phone call. I followed up on it and it felt no fun at all, neither by setting it up nor by playing it. This is why I'm making a new thread.

So, my question is;
How do I set up an event using "input number" that lets the player type a unique in-game phone number that leads to the right actor that the player wants/needs to call in order to follow on a quest or to start a quest? - What is the solution for such an event?
(The idea of my project is to make the in-game phone dialing system possible and realistic.)
 
Last edited:

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,721
Reaction score
15,304
First Language
English
Primarily Uses
RMMV
um ... you just do Input Number into a variable, then a Conditional Branch to see if that variable contains the correct phone number?
 

Mercedes90

Veteran
Veteran
Joined
May 7, 2021
Messages
66
Reaction score
9
First Language
English
Primarily Uses
RMMV
um ... you just do Input Number into a variable, then a Conditional Branch to see if that variable contains the correct phone number?
Thanks for your reply, Shaz. I'm still trying to learn how to use the event creation entirely.
May I have a little more detailed guide on this solution?
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,721
Reaction score
15,304
First Language
English
Primarily Uses
RMMV
Let's say the number the player must dial is 123456789.

You will do Input Number into a variable.
Then you will do Conditional Branch to check if that variable is equal to 123456789. You might enable the Else box in the conditional branch.
In the "true" block you will add whatever event commands you want to run if the player enters the right number. This could be a conversation between the player and whoever they have called, or just something to indicate they have dialed the right number, or just turning on a switch or incrementing another variable to indicate the game is allowed to progress. You probably also want to switch this event to the next page so the player can't dial again.
In the "false" block (if you want to actually do something if they entered the wrong number, and checked the Else box) just put what you want to happen if they got the number wrong.

I guess this is still just text displaying on the screen. If that's not actually what you want, then you're going to have to be more descriptive about what you want to happen.
 

Mercedes90

Veteran
Veteran
Joined
May 7, 2021
Messages
66
Reaction score
9
First Language
English
Primarily Uses
RMMV
Let's say the number the player must dial is 123456789.

You will do Input Number into a variable.
Then you will do Conditional Branch to check if that variable is equal to 123456789. You might enable the Else box in the conditional branch.
In the "true" block you will add whatever event commands you want to run if the player enters the right number. This could be a conversation between the player and whoever they have called, or just something to indicate they have dialed the right number, or just turning on a switch or incrementing another variable to indicate the game is allowed to progress. You probably also want to switch this event to the next page so the player can't dial again.
In the "false" block (if you want to actually do something if they entered the wrong number, and checked the Else box) just put what you want to happen if they got the number wrong.

I guess this is still just text displaying on the screen. If that's not actually what you want, then you're going to have to be more descriptive about what you want to happen.

This is a large part of what I'm looking for, thank you. But there's more, I'll be descriptive anyway about what exactly will happen since there are more needs to make this possible;
• If a player dials a correct number - the player will be forced to wait (unable to move, facing the phone, hears the ringing tones) until an actor "picks up the phone" and a text conversation will start.
• If it's an incorrect number has been entered - (it will keep ringing until) the player hears the answering machine speak along with a text message that pops up.

This means that I want it all to be "synced" with the sound effects (that I will record on my own). There must be a way to do this manually to cause an event to wait or pause at the desired few seconds to make it as if it's synced with the sound effects before it continues to the next chart of the event to occur (like a text)?
 
Last edited:

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,721
Reaction score
15,304
First Language
English
Primarily Uses
RMMV
until an actor "picks up the phone" and a text conversation will start.
How does this happen? Actors don't "do" anything in the game - the player does it.

If you just mean the game is going to wait for a few seconds, you can use a Wait command for that, then add any other commands you want to. If you want it to play a ring tone while it's waiting, then you can set it up as a BGM or BGS and use the Play BGM/BGS commands which will make it loop, followed by Stop BGM/BGS to stop it (remembering you can only have one of each per map so if you already have a BGM or BGS it will replace them). Or you can create an SE that's a series of rings and play that with the Wait for the required time. Or you can create an SE that's a single ring, and use a Loop to play it then Wait X number of times before going to the next command. To do that, it's something like this:

Code:
Control Variables: Rings = 0
Loop
  Play SE: Ring
  Wait X Frames
  Control Variables: Rings += 1
  Conditional Branch: Rings = 5
    Exit Loop
  End
End
 

Mercedes90

Veteran
Veteran
Joined
May 7, 2021
Messages
66
Reaction score
9
First Language
English
Primarily Uses
RMMV
(... until an actor "picks up the phone" and a text conversation will start.)
How does this happen? Actors don't "do" anything in the game - the player does it.
I know, Shaz. That's why I put quotations on that one as if it will seem like it for the player rather than how the event operates.
If you just mean the game is going to wait for a few seconds, you can use a Wait command for that, then add any other commands you want to. If you want it to play a ring tone while it's waiting, then you can set it up as a BGM or BGS and use the Play BGM/BGS commands which will make it loop, followed by Stop BGM/BGS to stop it (remembering you can only have one of each per map so if you already have a BGM or BGS it will replace them). Or you can create an SE that's a series of rings and play that with the Wait for the required time. Or you can create an SE that's a single ring, and use a Loop to play it then Wait X number of times before going to the next command. To do that, it's something like this:

Code:
Control Variables: Rings = 0
Loop
  Play SE: Ring
  Wait X Frames
  Control Variables: Rings += 1
  Conditional Branch: Rings = 5
    Exit Loop
  End
End

Overall, the rest of what you mentioned here is what I meant.
I will experiment with this and see how it goes. Thanks.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,721
Reaction score
15,304
First Language
English
Primarily Uses
RMMV
I know, Shaz. That's why I put quotations on that one as if it will seem like it for the player rather than how the event operates.
Yes, but you're asking for help to do something "when an actor picks up the phone". We can't help you unless you explain what that means. It could just be a delay, it could be that the player has to do something, or it could be that you have some fancy NPC AI/events happening and one of them needs to do something. And all 3 of those would require a different approach. So we can't offer any help unless you also explain what the game does to mimic an actor picking up the phone.

What you're describing is what the player sees, which is good (a lot of people leave that out and just get to the nuts and bolts of things, which is also confusing), but it's also good sometimes to include a bit of a description of the mechanics of how you're doing something.
 

Mercedes90

Veteran
Veteran
Joined
May 7, 2021
Messages
66
Reaction score
9
First Language
English
Primarily Uses
RMMV
Yes, but you're asking for help to do something "when an actor picks up the phone". We can't help you unless you explain what that means. It could just be a delay, it could be that the player has to do something, or it could be that you have some fancy NPC AI/events happening and one of them needs to do something. And all 3 of those would require a different approach. So we can't offer any help unless you also explain what the game does to mimic an actor picking up the phone.

What you're describing is what the player sees, which is good (a lot of people leave that out and just get to the nuts and bolts of things, which is also confusing), but it's also good sometimes to include a bit of a description of the mechanics of how you're doing something.
Sorry for the late reply, Shaz. I have taken my time recently to experiment a bit with the event editor such as "Input Number", "Control Variable", and "Conditional Branch" to make "phone call events", which was a failure.
I have zero experience knowing how the "Control Switch" and the "Self Switch" works. I've taken a few tutorials, but it's still not as simple as it seems since this "Phone Call" idea of mine is more complex.

I have not been very clear earlier because I felt skeptical that someone else who reads this might take this idea of mine into his own, but I'll do my best to explain my problem in the best way I can, anyways.

Okay, so here's what I would like to do;

  1. The Player walks up to a phone and hits the "Action" button to start the event.

  2. The Player must first dial an 8 digit number which will be like a "phone number" (8 digits seems to be the limit of "Input Number").
    Below in rows A and B, I'll explain in detail how I want the Phone Calling events to work:

    • A ) Wrong Number.
    If the Player dials a wrong 8 digit number, then a text message + an answering machine will play as a BGS, saying; "The phone number you have dialed is not in service...", which is something I've planned to add in the game - The Player must be unable to move during this process. The reason why the Player must be unable to move is that the BGS may continue to play after the Player closed the text message and started walking away from the phone. If I let this happen, then it will just make it look rather weird than enticing. So, I cannot let that happen.
    So, I will try out the Wait commands that you've provided.

    • B ) Correct Number.
    If the Player dials a correct 8 digit number (which can be found in-game among many other "phone numbers"), for example; "55511775", then text messages + a sound effect of a phone will be played as well (sounds which I will get on my own) - A whole new event after the last text message will start (such as a "main story quest"), based by that one correct 8 digit number. If a different phone number is also correct, for example; "55541415", this different number will lead to an entirely different event (such as a side-quest).

  3. After the Player has dialed one of the correct/specific numbers, for example; "55511775", following a bunch of text messages, instructing the Player on what to do and what the quest is all about, the quest will begin after the last text message, that number "55511775" cannot be dialed again. Whether the Player has completed or incompleted the quest, the number must be deleted and cannot be dialed again. If the Player does dial it, it should occur/switch as a "Wrong Number".
    There should be no possibility for the Player to even read the text messages after dialing that correct number for the second time. It should only be possible for the first time per New Game.

  4. There are not one or two phones added to the map. The game I'm working on is a map of a whole city that I'm currently building. The size of the main map (the city) is 256x256. And in every building there's a door event, the Player is at liberty to walk through it and is then led to a different indoor map. There will be public phones in the city map and phones in indoor maps such as in Pubs, Offices or Apartments, etc. So, it is very important for me to make sure that the Phone Calling events throughout the main city map, and other maps, must work simultaneously. I mean the Player cannot dial the same number twice on the same or a different phone, whether it is on the same map or a different one.

This is all I believe. I hope I made it clear this time. If something is amiss, just let me know.
And I'm strongly willing to make this work.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,721
Reaction score
15,304
First Language
English
Primarily Uses
RMMV
Very thorough explanation. Thank you. Don't worry about other people stealing your ideas - if they can't come up with their own, they won't have what it takes to implement someone else's.

How do you know when a number becomes valid? You have said, after the player dials 55511775, they should not be able to dial it again, and if they do, they will get a "wrong number". But at what point in the game CAN they dial that number? Can they dial it from the very beginning of the game, in the hope they will randomly get a correct number? Or do they have to go to that particular map, to a particular event, that makes them "aware" of that number, after which point they can dial it (and before they have gone to that map and that event, they get the "wrong number" message)?

The solution will actually be quite simple, but I need that question answered first. I will then give you all the steps to achieve it.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
2,250
Reaction score
1,208
First Language
English
Primarily Uses
RMMV
I just wanted to add a few things onto the help Shaz is giving/has promised you. The biggest thing is that I encourage you to do some more tutorials. There's the one built into MV, then there are a bunch of video series on YouTube that teach you pretty in-depth about the editor. I'm a fan of Echo607, but there's DriftWood, SumRndmDde (spelling), and a bunch of others, whichever one fits your personal style.

This is important because all you're doing here is a cutscene. The way you're initiating it with the phone number is pretty unique, but once you get into that, it's just a cutscene, so anything dealing with eventing and cutscene techniques will apply (and a number of your questions are about pretty basic eventing techniques).
I have zero experience knowing how the "Control Switch" and the "Self Switch" works.
This, for example. It's very common advice around here that Your Game that you really want to make should not be the first thing you do. Make a simple, basic, pointless game along with whatever tutorial you're using. Practice using the techniques. Playtest it to see how things work.
The Player must be unable to move during this process.
You have emphasized this multiple times across your posts, but it's completely unnecessary. If you had made/playtested a game, you would know that players can't move while events are running. That's how they work. You have to intentionally choose to make an event that allows it (a parallel process).
 

Mercedes90

Veteran
Veteran
Joined
May 7, 2021
Messages
66
Reaction score
9
First Language
English
Primarily Uses
RMMV
How do you know when a number becomes valid? You have said, after the player dials 55511775, they should not be able to dial it again, and if they do, they will get a "wrong number". But at what point in the game CAN they dial that number? Can they dial it from the very beginning of the game, in the hope they will randomly get a correct number? Or do they have to go to that particular map, to a particular event, that makes them "aware" of that number, after which point they can dial it (and before they have gone to that map and that event, they get the "wrong number" message)?

The solution will actually be quite simple, but I need that question answered first. I will then give you all the steps to achieve it.


Sure thing, Shaz. Let's say; this phone number "55511775" for example, is the very first number that the Player will receive at the beginning of where the game starts; inside his/her apartment map. Let's say, that phone number is part of the first Main Quest. The player may have the freedom to get out of the starting map (the apartment) and head out to explore the main map (the city) without dialing the number. The player is at freedom to dial the first number to start the first Main Quest later at another time if he likes to and is free to do so on any phone in any place/map he visits.
(This game is an open world with a lot of freedom.)

The Main Quest numbers should be fixed - for example; "55511775" is connected to the first quest, and it is impossible to re-dial it for the second time.​
• Q: When will it be impossible to re-dial it?​
• A: If the instructions are given to the Player in a text message by the "Phone Call", which told the Player to "find and speak to a certain NPC inside a pub, he/she looks like this and wears that..." after the Player finds that NPC and hits the Action button, that is when the used phone number will have to become invalid and unable to be re-dialed ever again - turning/switching into a "wrong number".​

The Player will receive the next Main Quest phone number; "55512345", from another NPC at the fourth Main Quest to start the fifth Main Quest.
The Main Quest numbers, should not work if the Player randomly or accidentally dials them except for the particular/unique Main Quest phone number that the Player has already been given.
And it should not work vice versa; as if the Player dials a later-on phone number which is for the Fifth Main Quest on his current First, Second, or Third Main Quest.
So, this means that I should make sure that the executed 'Event no. 1' will activate 'Event no. 2' will activate 'Event no. 3, etc.?

However, only the Side-Quest phone numbers should be slightly different - For example; "55541415" is free for the player to dial it at any point in-game to begin the Side-Quest, but also work only one-time. Whether the player finds the Side-Quest phone numbers in-game or is lucky enough to accidentally/randomly dials them without finding them, they (the Side-Quest phone numbers) should not be fixed at a certain point in-game, rather free to dial them at any time. But work only one time - Event deletion after hitting the Action button to whatever the Player has instructed to interact with.
In short:​
The only similarity between the two;
  • The only similarity that the Side-Quest phone numbers have with the Main-Quest phone numbers is that both should be impossible to re-dial for the second time after the Player follows on with the instructions and hits the Action button to whatever he has been instructed to interact with; A particular NPC, door, chest, or something else.
What is different between the two;
  • Main-Quest phone numbers are fixed and can only be dialed and work at certain points to begin the next Main Quest - The Main Quest phone number to start the Sixth Quest should NOT work until the Fifth Quest is completed.
  • Side-Quest phone numbers are unfixed, rather free to dial them at any time and shall have no connection to the Main Quests, but work only one time - Phone number deleted after hitting the Action button to whatever the Player has instructed to interact with, for example; a correct NPC.
Overall; each phone number for either Main Quest or Side-Quest, must be impossible to be re-dialed after the first and correct interaction by the Player that was instructed to do from the Phone Call.

Thank you :)
 
Last edited:

Mercedes90

Veteran
Veteran
Joined
May 7, 2021
Messages
66
Reaction score
9
First Language
English
Primarily Uses
RMMV
I just wanted to add a few things onto the help Shaz is giving/has promised you. The biggest thing is that I encourage you to do some more tutorials. There's the one built into MV, then there are a bunch of video series on YouTube that teach you pretty in-depth about the editor. I'm a fan of Echo607, but there's DriftWood, SumRndmDde (spelling), and a bunch of others, whichever one fits your personal style.

This is important because all you're doing here is a cutscene. The way you're initiating it with the phone number is pretty unique, but once you get into that, it's just a cutscene, so anything dealing with eventing and cutscene techniques will apply (and a number of your questions are about pretty basic eventing techniques).

This, for example. It's very common advice around here that Your Game that you really want to make should not be the first thing you do. Make a simple, basic, pointless game along with whatever tutorial you're using. Practice using the techniques. Playtest it to see how things work.

You have emphasized this multiple times across your posts, but it's completely unnecessary. If you had made/playtested a game, you would know that players can't move while events are running. That's how they work. You have to intentionally choose to make an event that allows it (a parallel process).

Although, you're completely right and I agree with you, but I learn way faster when asking questions and receiving answers than watching and follow up. But I will definitely take your advice and get into some more tutorials today, try my best, and practice with the Event Editor.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,721
Reaction score
15,304
First Language
English
Primarily Uses
RMMV
Okay, the method I give you will require one variable for each valid phone number, and a common event that will handle all the "make a call" logic for all numbers. Using a variable means we can have multiple states for each number - the number is not available, the number is available but hasn't been called, and the number has been called. You could also use switches, but it would mean two switches for each phone number.

So for the events that will 'enable' each phone number, do a Control Variables command and set the variable that controls that phone number to 1. You will need to make sure this event page can only be run once, otherwise you might end up enabling a phone number, calling that number, then coming back to this event and enabling it again.

On your starting map, create an event with a parallel process trigger. In this event, do a Control Variables command to set all the variables that control the side quest phone numbers to 1, and turn on Self Switch A. Then create a second event page and set its condition to Self Switch A without changing anything else on the page. This will make it run only at the very start of the game, to make all the side quest phone numbers available. If you have the variables grouped - say, all the main quest phone numbers will be controlled by variables 100-199, and all the side quest phone numbers will be controlled by variables 200-299, then you can just do a single Control Variables command for the side quests, using 200-299 as the range to set to 1, rather than repeating the command for 100 individual variables.

Now create a common event for the "phone call". Leave its trigger as none. We'll come back to this in a minute.

Finally on every phone event, simply add a Common Event command and specify this "phone call" common event. This means no matter what phone you interact with on what map, the same processing will happen.


Now back to the common event. Add commands to it that look like this (these are event commands, not a script call - don't get confused by the word "code" here):

Code:
Input Number: "Phone Number" (new variable) - 8 digits

Conditional Branch: Phone Number = 12345678 (your first valid phone number)
  Conditional Branch: 12345678 (the variable that controls that number) = 1
    Play SE: 12345678 message
    Wait X frames
    Control Variables: 12345678 (the variable that controls that number) = 2
    Exit Event Processing
  Else
    Jump to Label: Bad Number
  End
End

Conditional Branch: Phone Number = 11223344 (your second valid phone number)
  Conditional Branch: 11223344 (the variable that controls that number) = 1
    Play SE: 11223344 message
    Wait X frames
    Control Variables: 11223344 (the variable that controls that number) = 2
    Exit Event Processing
  Else
    Jump to Label: Bad Number
  End
End 

... repeat the above block for each phone number

Label: Bad Number
Play SE: Invalid Number message
Wait X frames


Okay, let's go through this.

First, we are getting the phone number from the player.
Then we are comparing it to each valid phone number.
Once we've found a valid phone number, we're checking to see if the player is actually allowed to call that number at this point in the game.
If they are allowed, we play the appropriate SE for that message (note you said BGS, but it is not a BGS, as that will loop/repeat until you tell it to stop, which we don't want; it needs to be an SE which will play once and then stop).
Then we wait an appropriate number of frames for that message to play (60 frames is 1 second, so if the SE takes 5 seconds to play, you will wait for 60 x 5 = 300 frames - you might need to experiment a bit with this). This is what makes the player stand there until the message has finished.
Then we change the variable to 2, which indicates they've called that number and are no longer allowed to call it anymore.
Finally the Exit Event Processing is just an early exit point - they've called a good number, we've done what needed to be done, and there's no need to check for any more numbers.
If it's a valid number but they're either not allowed to call it yet, or they've already called it, the event will fall through to the Else statement, and because we want the same thing to happen here no matter what the number was, we'll just jump to a label at the bottom of the event so we only have to add the commands once.

Now for the Bad Number label ... this will be processed if the player called a valid number when they're not allowed to or after they've already called it, and we've told it to jump down here. It will also be processed if the number the player entered didn't match any of the valid numbers.
Here we just play the SE for the "wrong number" message and wait the appropriate number of frames for the message SE to finish.
Because we're already at the bottom of the common event, we don't need to worry about an Exit command, as that's going to happen by default anyway.


So that's the non-script way to do it. There IS another way that involves a single variable to hold an array of ALL the phone numbers that can be called, and script calls that will reduce the common event to just a single block. If you would prefer to do that and feel comfortable about doing some script calls, say so and I'll give you that method as well.
 

Mercedes90

Veteran
Veteran
Joined
May 7, 2021
Messages
66
Reaction score
9
First Language
English
Primarily Uses
RMMV
Okay, the method I give you will require one variable for each valid phone number, and a common event that will handle all the "make a call" logic for all numbers. Using a variable means we can have multiple states for each number - the number is not available, the number is available but hasn't been called, and the number has been called. You could also use switches, but it would mean two switches for each phone number.

So for the events that will 'enable' each phone number, do a Control Variables command and set the variable that controls that phone number to 1. You will need to make sure this event page can only be run once, otherwise you might end up enabling a phone number, calling that number, then coming back to this event and enabling it again.

On your starting map, create an event with a parallel process trigger. In this event, do a Control Variables command to set all the variables that control the side quest phone numbers to 1, and turn on Self Switch A. Then create a second event page and set its condition to Self Switch A without changing anything else on the page. This will make it run only at the very start of the game, to make all the side quest phone numbers available. If you have the variables grouped - say, all the main quest phone numbers will be controlled by variables 100-199, and all the side quest phone numbers will be controlled by variables 200-299, then you can just do a single Control Variables command for the side quests, using 200-299 as the range to set to 1, rather than repeating the command for 100 individual variables.

Now create a common event for the "phone call". Leave its trigger as none. We'll come back to this in a minute.

Finally on every phone event, simply add a Common Event command and specify this "phone call" common event. This means no matter what phone you interact with on what map, the same processing will happen.


Now back to the common event. Add commands to it that look like this (these are event commands, not a script call - don't get confused by the word "code" here):

Code:
Input Number: "Phone Number" (new variable) - 8 digits

Conditional Branch: Phone Number = 12345678 (your first valid phone number)
  Conditional Branch: 12345678 (the variable that controls that number) = 1
    Play SE: 12345678 message
    Wait X frames
    Control Variables: 12345678 (the variable that controls that number) = 2
    Exit Event Processing
  Else
    Jump to Label: Bad Number
  End
End

Conditional Branch: Phone Number = 11223344 (your second valid phone number)
  Conditional Branch: 11223344 (the variable that controls that number) = 1
    Play SE: 11223344 message
    Wait X frames
    Control Variables: 11223344 (the variable that controls that number) = 2
    Exit Event Processing
  Else
    Jump to Label: Bad Number
  End
End

... repeat the above block for each phone number

Label: Bad Number
Play SE: Invalid Number message
Wait X frames


Okay, let's go through this.

First, we are getting the phone number from the player.
Then we are comparing it to each valid phone number.
Once we've found a valid phone number, we're checking to see if the player is actually allowed to call that number at this point in the game.
If they are allowed, we play the appropriate SE for that message (note you said BGS, but it is not a BGS, as that will loop/repeat until you tell it to stop, which we don't want; it needs to be an SE which will play once and then stop).
Then we wait an appropriate number of frames for that message to play (60 frames is 1 second, so if the SE takes 5 seconds to play, you will wait for 60 x 5 = 300 frames - you might need to experiment a bit with this). This is what makes the player stand there until the message has finished.
Then we change the variable to 2, which indicates they've called that number and are no longer allowed to call it anymore.
Finally the Exit Event Processing is just an early exit point - they've called a good number, we've done what needed to be done, and there's no need to check for any more numbers.
If it's a valid number but they're either not allowed to call it yet, or they've already called it, the event will fall through to the Else statement, and because we want the same thing to happen here no matter what the number was, we'll just jump to a label at the bottom of the event so we only have to add the commands once.

Now for the Bad Number label ... this will be processed if the player called a valid number when they're not allowed to or after they've already called it, and we've told it to jump down here. It will also be processed if the number the player entered didn't match any of the valid numbers.
Here we just play the SE for the "wrong number" message and wait the appropriate number of frames for the message SE to finish.
Because we're already at the bottom of the common event, we don't need to worry about an Exit command, as that's going to happen by default anyway.


So that's the non-script way to do it. There IS another way that involves a single variable to hold an array of ALL the phone numbers that can be called, and script calls that will reduce the common event to just a single block. If you would prefer to do that and feel comfortable about doing some script calls, say so and I'll give you that method as well.

I'm glad that you took your time to write the solution for me, but unfortunately, only some part of it worked, but not entirely. The event seems to be broken. What's happening here is that whenever I test play this event and and dial the correct number, it skips/jumps to the Bad Number section and plays the "Wrong Number" SE, anyway. Both numbers, though. Doesn't matter if it's the correct numbers or a wrong one. No difference. It skips the first part of the event. I've also made the Parallel event exactly as you described it - still nothing.

I did also try to create a common event with only one valid number Variable, yet it did not work either.

I'd gladly try out the Script.

Here's a copy of the "Phone Call" Common event I've made.
Been trying to experiment and figure this out for 6 hours on my own now, and found no solution. I might have done something wrong here, but you'd probably see the flaw better than I do:

◆Input Number:55517799, 8 digits
◆If:55517799 = 55517799
--◆If:55517799 = 1
----◆Play SE:Phone Call - Correct Number 1.ogg (90, 100, 0)
----◆Wait:900 frames
----◆Control Variables:#0101 55517799 = 2
----◆Exit Event Processing
----◆
--:Else
----◆Jump to Label:Bad Number
----◆Play SE:Phone Call - Wrong Number.ogg (90, 100, 0)
----◆Wait:900 frames
----◆
--:End
◆Exit Event Processing

:End
◆Input Number:55533551, 8 digits
◆If:55533551 = 55533551
--◆If:55533551 = 1
----◆Play SE:Phone Call - Correct Number 1 (90, 100, 0)
----◆Wait:900 frames
----◆Control Variables:#0102 55533551 = 2
----◆Stop SE
----◆Exit Event Processing
----◆
--:Else
----◆Jump to Label:Bad Number
----◆Play SE:Phone Call - Wrong Number (90, 100, 0)
----◆Wait:900 frames
----◆Exit Event Processing
--:End
--◆

:End
 
Last edited:

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,721
Reaction score
15,304
First Language
English
Primarily Uses
RMMV
Please go over my commands again. What you have is not what I had.

I have no Stop SE command anywhere in my steps, because it is not needed.
In my steps, there is nothing after the Jump to Label command in each block.
You have extra Exit Event Processing commands that I do not have.


Also, did you 'trigger' the number by setting the variable to 1 in another event, before interacting with the phone?
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
2,250
Reaction score
1,208
First Language
English
Primarily Uses
RMMV
Code:
Input Number: "Phone Number" (new variable) - 8 digits

Conditional Branch: Phone Number = 12345678 (your first valid phone number)
  Conditional Branch: 12345678 (the variable that controls that number) = 1
In Shaz's example, this is talking about two different variables, as you can see (one called Phone Number and one called 12345678).

◆Input Number:55517799, 8 digits
◆If:55517799 = 55517799
--◆If:55517799 = 1
You are trying to use the same variable twice in a row. I know you're new to this, and I don't mean to sound insulting, but it's pretty basic logic that the same variable could never be equal to 55517799 and 1 at the same time. :wink:
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,721
Reaction score
15,304
First Language
English
Primarily Uses
RMMV
That is probably partly my fault. I should have given the variable a slightly different name to distinguish the variable controlling the number, and the number as a constant.

But you're right in that the variable in the Input Number, and the variable that's compared to 1, are not the same variable. The input number variable is compared only to the actual phone number. The variables controlling the availability of the different numbers is only compared to 1.
 

Mercedes90

Veteran
Veteran
Joined
May 7, 2021
Messages
66
Reaction score
9
First Language
English
Primarily Uses
RMMV
In Shaz's example, this is talking about two different variables, as you can see (one called Phone Number and one called 12345678).

You are trying to use the same variable twice in a row. I know you're new to this, and I don't mean to sound insulting, but it's pretty basic logic that the same variable could never be equal to 55517799 and 1 at the same time. :wink:
That is probably partly my fault. I should have given the variable a slightly different name to distinguish the variable controlling the number, and the number as a constant.

But you're right in that the variable in the Input Number, and the variable that's compared to 1, are not the same variable. The input number variable is compared only to the actual phone number. The variables controlling the availability of the different numbers is only compared to 1.

Okay, I misunderstood the part with the Variable controlling the number. I have been told before that two Variables should never be the same but I forgot about it.​
Anyhow, I've changed the contents in the events the way you've described it, and yet there's no better difference. I know that I'm doing it all wrong here, but I cannot find the solution when I experimented with this by changing the contents and the numbers that control the Variables, and so on. I have posted screenshots below to show you both in detail so you can spot the flaws that I'm unaware of. I have experimented with many changes with every created event shown below, but no luck.​
Please, don't expect these screenshots are my only try.​
Even though I have always been interested in Coding and Programming, yet I've never been successful with it, even with "Hello World!" basics... but I'm still here trying to understand this stuff. So, I'm asking you not to get frustrated with me. :smile:
I've made comments stating what I have tried on the last screenshot (EVENT D).​


Ev. A.png


Ev. B.png

Ev. C.png

Ev. D.png
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
4,509
Reaction score
1,730
First Language
Dutch
Primarily Uses
RMMV
if you want the input number to check,
it's best to check the phone call by using 2 variables:
phone Index (first in line) and phone check (to see if it's correct).

if you take a look to my ocarina tutorial, you can turn it into a phone
as well, without the required images, but on number check.

it shouldn't be to difficult to convert it to a number checking.
but it makes things far easier + you use 1 variable per phone number,
starting with variables = -1 so you need to learn/get the number before
you can dial it.

another way is to use choice list and switches, to dial them directly
when they have it, and a switch to call, if they try to call while that
switch is off, it isn't important, so there are some ways to make it work.

depending what you feel comfortable with.
 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

Something might be coming...
Hallo.png
A new day for creating :)
2021 has been the runner-up for the worst year of my life. 2015 may take that title, but '21 is pushing it. Excuses really don't justify how much of a jerk I've been this year to a lot of people.

I'm sorry. I don't intend to be a jerk forever, but I'd rather back up my intent with actions, not words.
"Another hundred habaneros... a teaspoon of tumeric... and a heaping helping of nitroglycerin!" The kitten in a chef's hat laughed maniacally as the pot he was stirring promptly exploded.

Forum statistics

Threads
116,016
Messages
1,094,935
Members
151,331
Latest member
Guy_Rocketram
Top