Jump to content

Photo

Dungeon's boss music change script.


  • Please log in to reply
12 replies to this topic

#1 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 04 October 2008 - 06:18 AM

CODE
ffc script BossMusic {
  void run(int music, int music2) {
    Waitframes(5);
    if (Screen->NumNPCs() > 0) {
      Game->PlayMIDI(music);
    }
    while(Screen->NumNPCs() > 0) {
      Waitframe();
    }
    Game->PlayMIDI(music2);
  }
}


this FFC script is a script that when you enter the boss room it plays a certain MIDI and when you defeat it IT plays another one(preferibly the dmaps MIDI) i need help fixing the brackets in this script since it wont compile correctly onto ZQUEST.

Edited by drzchulo973, 04 October 2008 - 06:19 AM.


#2 Sephiroth

Sephiroth

    The Legendary Sephiroth

  • Members
  • Location:Somewhere... Lemme know if you find me :)

Posted 04 October 2008 - 08:07 AM

It compiled fine for me without any problems. Could be the tabbing counts as well. (Also works flawlessly, but not sure how it'd work with FFC/Scripted bosses)

CODE
ffc script BossMusic {
    void run(int music, int music2) {
        Waitframes(5);
        if (Screen->NumNPCs() > 0) {
            Game->PlayMIDI(music);
        }
        while(Screen->NumNPCs() > 0) {
            Waitframe();
        }
        Game->PlayMIDI(music2);
    }
}


*steals script for his own quest. icon_heh.gif*

#3 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 04 October 2008 - 08:30 AM

i dont know it just dont seem to compile on mines..it said error on line playMIDI or something..if it loads on yours then i dont know..it probably doesnt like me lol

#4 Sephiroth

Sephiroth

    The Legendary Sephiroth

  • Members
  • Location:Somewhere... Lemme know if you find me :)

Posted 04 October 2008 - 08:48 AM

FYI: I'm using 864. If you aren't using this build, try upgrading to it and try importing/compiling again then. But be sure to keep backups of your quest.

#5 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 04 October 2008 - 09:00 AM

yea that was the problem im using build 679 icon_sorry.gif no wonder its a really outdated build lol i dont know i dont want to upgrade or not planning to anytime soon..

#6 Sephiroth

Sephiroth

    The Legendary Sephiroth

  • Members
  • Location:Somewhere... Lemme know if you find me :)

Posted 04 October 2008 - 09:01 AM

Then I'm guessing build 679 doesn't support Game->PlayMIDI.

#7 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 04 October 2008 - 09:06 AM

but there could be a way to modify the script and make it work on an older build ..ill probably ask a more experienced scripter for this.

#8 Eddard McHorn Van-Schnuder

Eddard McHorn Van-Schnuder

    smash the bye button

  • Members
  • Real Name:Ronny Wiltersen

Posted 04 October 2008 - 09:12 AM

You know you don't need a script to do this?
You can just make it so that when the boss is supposed to appear, Link are warped to a copy of the screen, with the boss midi, then, when it's defeated, he's warped back to the original, or even better: ANOTHER copy, with the door you came into the room locked, and the door to proceed open.
Or isn't this what you're trying to do?

#9 Sephiroth

Sephiroth

    The Legendary Sephiroth

  • Members
  • Location:Somewhere... Lemme know if you find me :)

Posted 04 October 2008 - 09:13 AM

He's probably trying to prevent Link's position indicator from hopping all over the place.

#10 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 04 October 2008 - 09:20 AM

The thing is that i have shutters activated , and exactly what sephiroth said, the boss room is indicated . i tried that before and copied my entire dungeon map onto another and did a whole bunch of warps and ended up ruing the dungeon's boss room with all those warp points, i need the script to change the miniboss's room MIDI since it has the portal script and the dungeon's boss MIDI.

Edited by drzchulo973, 04 October 2008 - 09:46 AM.


#11 Sephiroth

Sephiroth

    The Legendary Sephiroth

  • Members
  • Location:Somewhere... Lemme know if you find me :)

Posted 04 October 2008 - 12:34 PM

You will have to upgrade if you want to use Game->PlayMIDI. There's no other way to script it.

#12 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 04 October 2008 - 08:06 PM

ill see if it works in build 798 then. thanks though

#13 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 05 October 2008 - 01:24 AM

Just tested it and it works miracles icon_smile.gif so whoever wants to use this script and forget about all those warps link has to go through to change the music, is welcome to. i cant get enough of this script icon_lol.gif


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users