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.

FPS Creator X10 / Entity pickup - music change

Author
Message
unfamillia
14
Years of Service
User Offline
Joined: 26th Jul 2010
Location: Preston, Lancashire
Posted: 22nd Nov 2011 09:29
Hello,

I have come across a scenario that I would require some advice about if at all possible please.

I want the music to change once I pickup a certain entity.

I am imagining I could just add 'soundloop=$0' to the weapons pickup fpi, and place my music in the weapons properties in the editor. However, this feels like a roundabout way of doing it.

Does anyone know of a different method?

Unfamillia


budokaiman
FPSC Tool Maker
15
Years of Service
User Offline
Joined: 24th Jun 2009
Playing: Hard to get
Posted: 22nd Nov 2011 13:52 Edited at: 22nd Nov 2011 13:56
Quote: "I am imagining I could just add 'soundloop=$0' to the weapons pickup fpi, and place my music in the weapons properties in the editor. However, this feels like a roundabout way of doing it.
"

You could use variables too. Setup a global var in the setup script "itempickedup" and then set it to 0. In your soundzone script you could just check if itempickedup is 0, if it is, play sound 0, if it's not 0, play sound 1. (Hoping that makes sense).

Something like this for your soundzone:


and add this to your setuplevel.fpi



Who says famine has to be depressing?
unfamillia
14
Years of Service
User Offline
Joined: 26th Jul 2010
Location: Preston, Lancashire
Posted: 22nd Nov 2011 14:03 Edited at: 22nd Nov 2011 14:06
@Budo

I will try this once i get home. Just on my lunch at work at the moment.

Thanks for this man. Great help. I have updated some more pics in my WIP thread, but, i will warn you.........there are no Dinosaurs there.......sorry man.

They were all killed by the bad guys!

Unfamillia

EDIT: Just thought, i am using Music Zones. Which means, you just have to pass through it once and then you can be anywhere in the level, and the sound will still loop. Will it be the same scenario for the afore mentioned zone? I assume it will be.


budokaiman
FPSC Tool Maker
15
Years of Service
User Offline
Joined: 24th Jun 2009
Playing: Hard to get
Posted: 22nd Nov 2011 14:24
Quote: "hich means, you just have to pass through it once and then you can be anywhere in the level"

No, it will start automatically, so just change:
":state=0,globalvarequal=itempickedup 0"
to
":state=0,globalvarequal=itempickedup 0,plrwithinzone=1"


Who says famine has to be depressing?
unfamillia
14
Years of Service
User Offline
Joined: 26th Jul 2010
Location: Preston, Lancashire
Posted: 22nd Nov 2011 21:53
Where do i nominate which item needs to be picked up in order for the change to happen?

Quote: "Setup a global var in the setup script "itempickedup" and then set it to 0"


I take it by this you mean; put this in your setuplevel.fpi

Sorry, my scripting is not at any particularly good level! This is the area i lack knowledge in! I am trying to learn.

Thanks for your help again Budo

Unfamillia


budokaiman
FPSC Tool Maker
15
Years of Service
User Offline
Joined: 24th Jun 2009
Playing: Hard to get
Posted: 22nd Nov 2011 22:53
Quote: "Where do i nominate which item needs to be picked up in order for the change to happen?"

Just throw "setglobalvar=itempickedup 1" into your item's main pickup script.

Quote: "I take it by this you mean; put this in your setuplevel.fpi"

Yes.

Quote: "Sorry, my scripting is not at any particularly good level! This is the area i lack knowledge in! I am trying to learn.

Thanks for your help again Budo"


No problem.


reauirentem
unfamillia
14
Years of Service
User Offline
Joined: 26th Jul 2010
Location: Preston, Lancashire
Posted: 23rd Nov 2011 18:56
Budo, quick question. I need a script to adjust the huds when my player loses health. I also need this script to loop sounds as the health becomes lower. I could probably script it myself over time, but, as you know I am on a deadline. So, I am throwing some business to our fellow developers, Ched and 2Beastmode. They run a site that lets you request any script for a fee. Very fair prices in my opinion, plus, I always like helping out fellow developers.

My question is this.

For the afore mentioned script, that will go in the setuplevel.fpi, is it the same commands and actions in x9 as it is in x10? Ched is experienced with x9 scripts only. He fears he may not be able to complete my script if the commands are different.

Thanks for reading.

Unfamillia.


budokaiman
FPSC Tool Maker
15
Years of Service
User Offline
Joined: 24th Jun 2009
Playing: Hard to get
Posted: 24th Nov 2011 00:37
Quote: "For the afore mentioned script, that will go in the setuplevel.fpi, is it the same commands and actions in x9 as it is in x10? Ched is experienced with x9 scripts only. He fears he may not be able to complete my script if the commands are different. "

Most of the commands should be the same (though, I honestly don't know X9 commands, I haven't used it for long before the recent larger updates). If any commands do differ, but still exist, it should be easy to convert them.


reauirentem
unfamillia
14
Years of Service
User Offline
Joined: 26th Jul 2010
Location: Preston, Lancashire
Posted: 24th Nov 2011 09:44
Thanks Budo,

I will let Ched know. I will be building the game this weekend and i will email a copy over to you, for you to take a look.

I will also send a copy over to StoryTeller for his honest feedback.

I am working on a trailer currently. Should have that finished after the weekend. I will probably use it as the intro video for the game.

Unfamillia


budokaiman
FPSC Tool Maker
15
Years of Service
User Offline
Joined: 24th Jun 2009
Playing: Hard to get
Posted: 24th Nov 2011 15:03
Quote: "I will be building the game this weekend and i will email a copy over to you, for you to take a look. "

Awesome, looking forward to it very much.


reauirentem

Login to post a reply

Server time is: 2024-11-21 13:20:37
Your offset time is: 2024-11-21 13:20:37