Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Product Chat / How can i use the script - MusicinZone.fpi ?

Author
Message
18SHAME
16
Years of Service
User Offline
Joined: 11th Nov 2007
Location:
Posted: 21st Jan 2008 13:54
Hi there !
I have a question about this script.
musicinzone = will play the music file specified SOUND0 field for as long as the player is inside the zone associated with this entity.
I make a room and there i put a Sound Zone with AI Script Main - musicinzone.fpi and a melody in format .wav in Sound0. If i open the door and walk inside the room, the melody isn`t started so i try with a Trigger Zone but the same problem.
I don`t know how to use this useful script... Should i put a bloodspat togheter with a trigger zone or ?
Where i can fit this script to working well ?
I`m waiting your message ! With friendship, Frank.
Nickydude
Retired Moderator
17
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 21st Jan 2008 14:15
Make sure any music / sound you use is in the audiobank folder.

Was going to take a break... But I missed FPSC!
18SHAME
16
Years of Service
User Offline
Joined: 11th Nov 2007
Location:
Posted: 21st Jan 2008 14:39
Hello NickyDude !
Yes i know the melody must be in the AudioBank folder of Fps Creator... the problem is i can`t make the script musicinzone.fpi workly. I don`t have any idea where must be put. Like i say, i try the script with Sound Zone and i change the AI Main. The old was - Soundinzone.fpi / the new - Musicinzone.fpi and doesn`t play the song. Maybe the script doesn`t need to fit into AI Main Script of Sound Zone and in another "section".
Can you get me out of here please ?
Nickydude
Retired Moderator
17
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 21st Jan 2008 15:02
To be honest, I've never used Musicinzone.fpi, I've always use Soundinzone and that seems to work ok.

Was going to take a break... But I missed FPSC!
18SHAME
16
Years of Service
User Offline
Joined: 11th Nov 2007
Location:
Posted: 21st Jan 2008 15:53
Yes, with soundinzone.fpi works great but i want musicinzone.fpi for - musicinzone = will play the music file specified SOUND0 field for as long as the player is inside the zone associated with this entity.
You got the idea ? I want the player hear the melody sometime just if he walk into the room and after when his outside, the song simple stop making noises.
With soundinzone.fpi the song continue whatever player do (runing from the room ) if the Sound Zone is activated...
Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 21st Jan 2008 18:11
Music is .mp3 and sound .wav if I recall it correctly.

Nickydude
Retired Moderator
17
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 21st Jan 2008 18:26
Ok, I've just tried .wav, .ogg, .mp3 and .mid and none of them play, does this command actually work?

Was going to take a break... But I missed FPSC!
18SHAME
16
Years of Service
User Offline
Joined: 11th Nov 2007
Location:
Posted: 21st Jan 2008 19:50
NickyDude, i`m sure it works couse i found the script in the original manual of Fps Creator but the problems is they don`t tell us how can we use it...
You remember the game - Legacy of Cthulhu (made in FPSC)? There when the player walk in the room a melody started and after, when hes out the melody slowly stop and again when you enter in room the melody start (if i remember corectly).
musicinzone.fpi can do that like the manual say but how i don`t know...
Maybe someone can tell us the truth here ?!
Thank`s!
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 21st Jan 2008 21:12
Quote: "Maybe someone can tell us the truth here ?!"


I made a little example of using the music and musicvolume actions and you can find it here.

Don't forget to visit Conjured Entertainment

18SHAME
16
Years of Service
User Offline
Joined: 11th Nov 2007
Location:
Posted: 22nd Jan 2008 12:22
Thank`s Conjured Entertainment... somehow it`s helpfully.
So nobody use the script musicinzone.fpi? )
I think this script after i check your post Conjured, he can work maybe with a bloodspot and the Sound Zone. A connection between this two.
Respect!
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 23rd Jan 2008 04:58
try this:




That oughta do it. Like the post Conjured linked to says (and I quote myself)
Quote: "About the $0 and $1 parts of the scripts... what they are supposed to do is load up the SOUND listed in the entity's properties.

Looking into the source code, when it finds either $0 or $1 as the value, it will set the sequence value to either -1 or -2 respectively. In the "MUSIC" code which sets the music it literally says this: "If the sequence value IS GREATER THAN ZERO then load up the music they want". So basically, FPSC is programmed to ignore the $0 and $1 values for music, and yet at the same time still recognises them for it.

As an after-thought, $0 and $1 only refer to the "Sound" and "Alt Sound" properties, so I suppose it doesn't make sense to use them for music? "



Good luck.


The one and only,
~PlystirE~

Urlforce:
Dude, I'd rather be declared a dbpro noob than an fpsc legend any day!
18SHAME
16
Years of Service
User Offline
Joined: 11th Nov 2007
Location:
Posted: 23rd Jan 2008 11:43
Very clever!
I will try PlystirE... Thank`s for posting couse i need help in this.
(path to music)= here i will add+ the name of song?
Exemple: :state=0,plrwithinzone=1:music=blabla.mp3,state=1
:state=1,plrwithinzone=0:music=lala.mp3,state=0
It`s correct? Or what seems to be the "path"?
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 23rd Jan 2008 12:22
Yes, the "path to music" is in reference to where the file is located (As well as the file name) from within the "Files" folder.

Example:

If your music is called "LaLa.mp3" and it is located in "FPS Creator/Files/audiobank/music" then your command would look like: "music=audiobank/music/LaLa.mp3"


The one and only,
~PlystirE~

Urlforce:
Dude, I'd rather be declared a dbpro noob than an fpsc legend any day!
18SHAME
16
Years of Service
User Offline
Joined: 11th Nov 2007
Location:
Posted: 23rd Jan 2008 14:30
Thank you again PlystirE for your patience with me!

Login to post a reply

Server time is: 2024-10-10 13:18:08
Your offset time is: 2024-10-10 13:18:08