HELP MAKING A CELLPHONE ITEM?

Posts

Pages: 1
As the title suggests, I'm trying to make an in-game cellphone.
Right now I have it as a Common Event in the Database.

(not pictured: i do turn switch 0003 off under the "Put Away" option, i was still messing with the script when i took the screenshot haha)

My concern is with the "Play Ringtone" option and there are two problems with it.
1) When I do NOT have another BGM currently playing, it does play the ringtone but I'd like to be able to stop the ringtone prematurely so that it doesn't keep looping if I choose another option.
2) When I DO have another BGM playing, choosing "Play Ringtone" refreshes the current song (eg, playing song1.wav from the beginning instead of playing cutesypirate.wav). I'd like for the BGM to stop while the ringtone is playing and restart again after the cellphone is put away.

I'd also like for "Play Ringtone" to change to "Stop Ringtone" while the tune is playing. How would I go about doing this?

Thank you in advance!

EDIT: added a bit more information for clarity
Marrend
Guardian of the Description Thread
21806
I think the answer you're looking for lies in "Memorize BGM" and "Play Memorized BGM". Perhaps adding a label/calling another common event to help resetting the BGM as well?
And you can use wait to set a play time for it, like 10-30.0 seconds, after which you either Play OFF or Play Memorized BGM.

Btw, that "there's no signal" thing, make a common event for each of those, and you can make the common event check for current location (I'd call it GPS, GPS_X, GPS_Y to avoid interference from events that use it for character location). If you're in a map that gets reception (like the world map or a town), you talk to them, if you're indoors or in a dungeon, it's dead zone time.
I managed to get it working! I ended up not using the Memorize BGM command, so I don't think I did it efficiently but at this point I'm just happy that it works the way I want.
What I ended up doing was making a switch that would turn on when the phone was "in use" and turn off the BGM.
@bulma: That is actually a really good idea that sounds a lot simpler than the web of conditional branching I was planning, haha. Thank you!
First of all, I think this should be a call event. Not autostart. There must be another event that controls when you take the cell phone out. Instead of turning on switch 3 to activavte this event, just change from autostart to call, and in that other event use the Call Event command to run this once.

To silence a bgm you can use Fade BGM with 0 sec. The bgm is technically still playing but it will be quiet. Or you could use Play BGM and pick OFF as the song. This will fully stop a song from playing. In most cases I'd suggest Play BGM OFF.

So put that command first in the play ringtone branch. Followed by the ring tone bgm.

If you want to be able to stop the ringtone at any moment, you will need to move things to a new event, or at least out of that branch. There it will be waiting for your key press and when you press the key it does Play BGM OFF, to stop the ring tone, followed by playing a new BGM. Like was mentioned, you can memorize a bgm and then replay whatever song was playing. You would have to memorize bgm at the start of the play ringtone branch, before stopping it.

I think the answer to number 2 is the same as the answer to number 1.

For your last question, when you play the ringtone, you need to turn on a switch; Playing Ringtone. Then you would use that switch to show a different set of options. This can done a few ways, one would be to incase the event in the picture above in a conditional branch that looks for the switch, Playing Ringtone. It would look like this:

Branch - if Playing Ringtone is OFF
(put everything from the picture above
*no else handler*

after that whole branch, put another branch.

Branch - if Playing Ringtone is ON
(put a copy of the previous stuff, but change Play Ringtone choice to Stop Ringtone choice. In this branch you need to turn off the switch Playing Ringtone at some point.)
*no else handler*

As for knowing where there is signal to use the cellphone, you can use one variable to track what map your on, then you would use conditional branches to determine what maps work and which ones don't. You would only need to track X and Y if different areas of the same map have different degrees of signal strength. Use the Variable Operations command, and at the bottom click on Sprite > Hero > Map ID. That will let you know what map your on.

There is another option. Have a switch called Have Signal. When you enter a new map, either turn ON or OFF the switch depending on if you should have signal on this map or not. This would probably be easier for you.

*edit: Looks like you managed to solve some if it ^.^
Pages: 1