Please, I need help!

This is a public forum, where you can find out everything you wanted to know about making games. Please don't use this forum as a place to recruit new members.

Moderators: adeyke, VampD3, eriqchang, Angelus3K

Post Reply
Message
Author
Sadistyk
Peasant Status
Posts: 11
Joined: Tue Apr 06, 2004 4:37 am
Location: Argentina
Contact:

Please, I need help!

#1 Post by Sadistyk » Sat Dec 18, 2004 3:11 am

Hello. This is the problem: I want that when the player character talk to a NPC (with RunDialog function) the background music change., and when the Player Character stops talking to the NPC, the background music is played again.
  If you didn't understand what I want to do: Is like in Monkey Island 3, when Guybrush is in the Barber Shop, a background music is played, but when he speaks to a NPC the background music changes to a very similar one, and when he stop talking the same music that was playing before is played again.
  Now, How do you do that with AGS? I can't get it done.


P.S.: Sorry for the mistakes, my english it's not the best.

Radiant
Knight Status
Posts: 386
Joined: Fri Jan 30, 2004 9:44 pm
Location: Realm of Amber
Contact:

#2 Post by Radiant » Sat Dec 18, 2004 8:52 am

Read the manual entry for run-script, which is a dialog command. Simply put, at the start of the dialog you'll need 'run-script 1', and at the end 'run-script 2'. Then in your global script, the function dialog_request will get called by your dialog. In that function, put 'if (param == 1) PlayMusic (-1); else if (param == 2) PlayMusic (5);'

Sadistyk
Peasant Status
Posts: 11
Joined: Tue Apr 06, 2004 4:37 am
Location: Argentina
Contact:

#3 Post by Sadistyk » Sat Dec 18, 2004 3:27 pm

Thanks

Post Reply