Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
deathmoverz24

Event triggering when youre near at the event

Question

Guys, can anyone help me. I want to play a background music when Im near at the event.

Actually Im making a Slender game on rmxp but I want to play a suspense music when slender is near at me. Lets say you are below 5 cells to Slender man then the music will play. I really need this. Can you guys give me some tips?

 

I also want to ask if I can play a sound effect when youre at autotile grasses?

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

You mean like ambiance? Try this: http://pastebin.com/Ay0n3LiC


  • This system will play SE at intervals in addition to the BGM/BGS. You can

  • # configure each map separately with its own array of SE to play. The SE

  • # will played randomly and will be played at random intervals (configurable).

Share this post


Link to post
Share on other sites
  • 0

Off the top of my head~~

 

Create a Parallel event:

 

Control Variable

#Determine Base Coordinates

Label: Recheck

[0001: Slender X] = [slenderman's Map X]

[0002: Slender Y] = [slenderman's Map Y]

[0003: Slender 2 X] = [slenderman's Map X]

[0004: Slender 2 Y] = [slenderman's Map Y]

[0005: Hero X] = [Player's Map X]

[0006: Hero Y] = [Player's Map Y]

[0001..0002] -= 5

[0003..0004] += 5

 

Conditional Branch

#Determine if Player Coordinates are near Slenderman

#Check X Coordinates for "Detection Box"

Variables [0005:Hero X] >= Variable [0001]

Variables [0005:Hero X] <= Variable [0003]

#Check Y Coordinates for "Detection Box"

Variables [0006:Hero Y] >= Variable [0002]

Variables [0006:Hero Y] <= Variable [0004]

#If Player X Y is inside "Slender Detection Box"

Play BGM: 'Slendersong', 100, 100

Wait: 1 Frame(s) [For Anti- Lag]

Jump to Label: Recheck

Branch End

Branch End

Branch End

Branch End

#If Player is not detected in "Detection Box", shut off music.

Play BGM: '', 100, 100

Wait: 1 Frame(s) [For Anti- Lag]

 

And your second question~~!!

 

## Step Sounds - Brew 01AUG10 (ref: Project3)
## Play a different sound with each terrain type
## You must have a file "terrain_x.ogg" in the Audio\SE folder
## Where 'x' is the terrain number. (1-7)
class Game_Player
alias step_sounds_increase_steps increase_steps
def increase_steps
step_sounds_increase_steps

## Frequency of sound effect. % 2 approx. every 0.5 seconds
## % 4 would be approx. every 1 second
if $game_party.steps % 2 == 0

 if terrain_tag > 0
 #play the sound for that terrain
 if FileTest.exist?("Audio/SE/terrain_" + terrain_tag.to_s + ".ogg")
	 Audio.se_play("Audio/SE/terrain_" + terrain_tag.to_s)
 end
 end
end
end
end

Share this post


Link to post
Share on other sites
  • 0

guys sorry. i was actually get helped from the chat right after i created the topic. he gave me the script i was kinda looking for. here it is http://forum.chaos-project.com/index.php?topic=8581.0

 

but i will also try these options you gave me. many thanks

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...