Help with Blizz-ABS battle music common event.

Started by Phasedscar, August 06, 2008, 10:17:32 pm

Previous topic - Next topic

Phasedscar

Ok, I'm trying to make a common event that will switch the backround music depending if I'm in the Blizz-ABS ABSEAL range.

"Disable ABS controls: when no  enemies are within ABSEAL range"

Basically I'm trying to set up battle music for use with Blizz-ABS.  Blizzard already mentioned that "$game_temp.in_battle" should set up the condition if the ABSEAL range is on.  So I've made the following eventing script.


@>Conditional Branch: script: $game_temp.in_battle
  @>Conditional Branch: Variable [0009]battle music == 0
      @>Memorize BGM/BGS
      @>Change Variable: [0009]battle music = 1
      @>
    :  branch end
  @>Fade out BGM: 4 sec
  @>wait 20 frames
  @>Play BGM: '005-boss01', 85, 100
  @>Label: battle
  @>Conditional Branch: script $game_temp.in_battle
      @>Wait 20 frames
      @>Jump to Label: battle
      @>
    :  Else
      @>Jump to Label: BGM
      @>
    :  Branch End
  @>
:  Else
  @>Label: BGM
  @>Fade out BGM: 4 sec
  @>wait 20 frames
  @>Restore BGM/BGS
  @>Control Variable: [0009]battle music = 0
  @>Label: BGM2
  @>Conditional Branch: script: $game_temp.in_battle
     @>
    :  Else
     @>Wait: 20 Frames
     @>Jump to Label: BGM2
    :  Branch End
  @>
:  Branch End
@>


It works in changing the battle music however it wont reset to the memorized BGM, meaning it's probably looping somewhere I don't want it to.  I've double checked the event pathing and I just can't quite figure out what's wrong.  Also it starts playing the battle music whenever I activate an event such as teleports.

Also, in case you're wondering why I have conditionals with Jump to Labels, it's so that the music will keep playing unless the condition (in this case being in battle) are met, and then it should change.  Or vice versa.
Spoiler: ShowHide
My own game project & My resource workshop! (respectively)
http://forum.chaos-project.com/index.php?topic=608.0 http://forum.chaos-project.com/index.php?topic=682.0



What that is? Affection area for flails. - Blizz-ABS, the ultimate ABS

The pictures in your signature may altogether be no more than 200kB. The height must not exceed 200 px and the width must not exceed 800 px. Altogether they may take up an area of 160000 px2. Every signature not matching this criteria is a subject of the moderator team to remove and leave this rule as message in your signature.

Blizzard

August 07, 2008, 07:05:16 am #1 Last Edit: August 07, 2008, 07:08:12 am by Blizzard
Hm... I just remembered that you need something more than just the in_battle flag since it's turned off during events. Try this

@>Conditional Branch: script: $game_temp.in_battle && !$game_system.map_interpreter.running? && !$game_temp.message_window_showing
  @>Conditional Branch: Switch [0009]battle music == OFF
    @>Memorize BGM/BGS
    @>Fade out BGM: 4 sec
    @>wait 20 frames
    @>Play BGM: '005-boss01', 85, 100
    @>Change Switch: [0009]battle music = ON
    @>
  :  branch end
:  Else
  @>Conditional Branch: Switch [0009]battle music == ON
    @>Fade out BGM: 4 sec
    @>wait 20 frames
    @>Restore BGM/BGS
    @>Control Switch: [0009]battle music = OFF
    @>
   :  Branch End
  @>
:  Branch End
@>


Don't forget: In events 20 frames = 1 second so you might wanna change the fade out time or the wait time. You have to keep in mind that parallel processes iterate over and over meaning they start from the beginning and are interrupted only at wait commands.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Phasedscar

I'll try that out Blizz, thanks  :)

The reason it's 20 frames instead of 80 is because it allows for a nice blend of music.  You don't even notice the switch up.

The only problem I see with what's set up is that once it loops back through the Memorized BGM/BGS will be that of the battle music and not the original backround music that was there before.  That's why I had those odd Conditional Branches with the  go to labels and wait commands (so that it checks the condition every second without rewriting the Memorized BGM, ensuring that I have the right music play again when needed)

Thanks again Blizzard, I'll try this out tomorrow when I have time to play with it.
Spoiler: ShowHide
My own game project & My resource workshop! (respectively)
http://forum.chaos-project.com/index.php?topic=608.0 http://forum.chaos-project.com/index.php?topic=682.0



What that is? Affection area for flails. - Blizz-ABS, the ultimate ABS

The pictures in your signature may altogether be no more than 200kB. The height must not exceed 200 px and the width must not exceed 800 px. Altogether they may take up an area of 160000 px2. Every signature not matching this criteria is a subject of the moderator team to remove and leave this rule as message in your signature.

Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Shadonking

some one should make a demo with an working event in it becuase iv tryied to get it to work but the battle bgm plays even when there is not a battle or enemy in the map.





Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Shadonking

How, do i do this in the abs script or in the events.





Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

Aqua

Quote from: Blizz-ABS Manual: 2.1. Basic Configuration
2.1.5. Disable ABS
Determines when the ABS controls should be disabled. There are 4 different options:
never; Blizz-ABS controls are always active
disable in maps without enemies; disables Blizz-ABS controls in maps where no enemies have been added
when all enemies dead; disables Blizz-ABS controls as soon as the map has no more enemies (i.e. when all enemies are killed)
when no enemies within ABSEAL range; disables Blizz-ABS if no enemies are within the updating range of ABSEAL
Note that disabling Blizz-ABSEAL will also affect the last option.

Shadonking

September 02, 2008, 12:59:42 pm #8 Last Edit: November 26, 2008, 08:25:40 am by Shadonking
ok.

what number should it be becuase iv tried 0-4 but non seem to have the affect i need.

edit

here is the event i done, is this ok

Spoiler: ShowHide


i cant get it to play when in range, does it need the extra bit of code on the enemy events to work becuase all i did was the enemy ID.






Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

Blizzard

If you use number 3, the battle music will start playing when enemies are within the range of ABSEAL which is the screen + "the Factor option" square beyond. -_-
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Shadonking

iv done that but when the common event trigger is on then is plays the battle music anyway.  :???:

i dont think the conditional branch is correct with the script becuase it never seems to work. at always lets the procces past it.





Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

Blizzard

You have to turn off the switch at the end of ANY auto-starting event and/or erase it or it will freeze your game.
-_-
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Shadonking

i know this,  :<_<:

i have it on parralel procces.

i was talking about this conditional brach

@>Conditional Branch: script: $game_temp.in_battle && !$game_system.map_interpreter.running? && !$game_temp.message_window_showing

it always seems to be on so it never goes to the else part of it. so no matter what ,it plays the the battle music.





Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

Blizzard

September 04, 2008, 10:06:39 am #13 Last Edit: September 04, 2008, 10:14:15 am by Blizzard
It's on as long as no event is running, no message window is showing and as long as you are "in battle". "in battle" is determined by "Disable ABS Mode". Have you disabled Blizz-ABSEAL in those maps by any chance? And are you using a normal value for the ABSEAL Factor (i.e. 2 or 3)?
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Shadonking

all iv done is put disable abs mode as 3 and thats it.

what do i have to do to abseal or is that all that needs to be done.





Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

Blizzard

Try this in a parallel process event:

$game_system.hud = $game_temp.in_battle


It will remove the HUD when you not "in battle". Use it to test whether the "in battle" flag is set right. It should disappear when enemies are outside of the screen and a bit beyond.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Aqua

Blizz, I tried doing that... and the HUD went away completely even if I'm in Arshes' face, pwning him and after he's dead.

Blizzard

Aqua, that happens because the "in battle" flag is turned off during event execution. I forgot about that. -_- In any case I found the bug. Line 5052-5055 should be

  def battlers_in_range
    return ($game_map.battlers.find_all {|battler|
        !battler.dead? && battler.update?}).size
  end


The .size should be removed:

  def battlers_in_range
    return ($game_map.battlers.find_all {|battler|
        !battler.dead? && battler.update?})
  end


-_-

Between line 6014 and 6015 should a line like this be added:

    $game_switches[ID] = $game_temp.in_battle


This will trigger a switch when you are in battle and you can use it instead of the condition "$game_temp.in_battle" in the scripted condition. That should work.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Shadonking

iv tried what you just sayed but now the music wont play.

will you make these changes in the blizz-abs update just in case i did it wrong.(i dont think i did)

the only problem is that the switch i chose wont turn on. where you put [ID] i put [003]






Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

Blizzard

Not [003], only [3] without the leading zeroes. And I actually did upload a fixed version.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.