Hello everyone,
I want my event to make a sounds when bumping into the player and not when I bump or touch a event.
More detail:
Sprite event------------->*Bumps player* = sound 1
Sprite event------------->*Bumps player* = sound 2
Sprite event------------->*Bumps player* = sound 3
Sprite event------------->*Bumps player* = sound 4
Sprite event------------->*Bumps player* = sound 5
Sprite event------------->*Bumps player* = sound 6
Sprite event------------->*Bumps player* = sound 7
NOT
Player touches-------------> *Bumps event* = sound 1,2,3,4,5,6,7
I don't want the sound to activate when the player touches the event.
Not sure if I need a script or not for this.
Thank you,
ZEFK
Sound effect when event runs into player?
● ARCHIVED · READ-ONLY
-
-
This is going to need a script. Moving to RGSS3 Script Requests
Are you saying you want a DIFFERENT sound each time the event bumps into the player? Or just the same one each time?
In fact, try this in a new slot:
class Game_Event < Game_Character def check_event_trigger_touch(x, y) return if $game_map.interpreter.running? if @trigger == 2 && $game_player.pos?(x, y) && !jumping? && normal_priority? << play sound here >> start end endend<< play sound here >> could be replaced with any of the following:Sound.play_actor_damage (or any of the Sound methods)
Sound.play_system_sound(n) (for a numbered sound defined in the System tab of the database)
Audio.se_play(filename[, volume[, pitch]]) (for a sound that's in your SE folder but not defined anywhere else)
for example
Audio.se_play("EventBump") -
So, wouldn't a player touch event work for this, Shaz?
Or is the problem the restriction that the noise not result from bumping into the event on the player's part?
Is that what you wanted, ZEFK? That the noise is ONLY when the event touches the player and NOT when the player touches the event? -
"Are you saying you want a DIFFERENT sound each time the event bumps into the player?"This is going to need a script. Moving to RGSS3 Script Requests
Are you saying you want a DIFFERENT sound each time the event bumps into the player? Or just the same one each time?
In fact, try this in a new slot:
class Game_Event < Game_Character def check_event_trigger_touch(x, y) return if $game_map.interpreter.running? if @trigger == 2 && $game_player.pos?(x, y) && !jumping? && normal_priority? << play sound here >> start end endend<< play sound here >> could be replaced with any of the following:Sound.play_actor_damage (or any of the Sound methods)
Sound.play_system_sound(n) (for a numbered sound defined in the System tab of the database)
Audio.se_play(filename[, volume[, pitch]]) (for a sound that's in your SE folder but not defined anywhere else)
for example
Audio.se_play("EventBump")
Yes, that's what I'm looking for. Many character will be making around 7 different sounds each.
I would need to list all the sounds for each character and call it to the event for when it touches the player.
Event1-(Strike1, slap1, hit1 ,howl1, swing1, bite1)
Event2-(Strike2, slap2, hit2 ,howl2, swing2, bite2)
etc (to event50)
Strike2 and strike1 are completely different. Every sound for each event will be unique or different.
There will be around 50 characters events. Each strike or event bump makes a different sound. I'd like the sounds to go in order after each bump.
A player touch won't work unless the player bumps into the event. The event bumping into me doesn't activate the sounds.So, wouldn't a player touch event work for this, Shaz?
Or is the problem the restriction that the noise not result from bumping into the event on the player's part?
Is that what you wanted, ZEFK? That the noise is ONLY when the event touches the player and NOT when the player touches the event? -
http://blog.rpgmakerweb.com/tutorials/event-triggers-part-1/
Thanks - I should have read up first. =]
Good luck, ZEFK -
I thought the "event touch" trigger would work, but it won't work for some strange reason. I could have just done it without a script in that case.http://blog.rpgmakerweb.com/tutorials/event-triggers-part-1/
Thanks - I should have read up first. =]
Good luck, ZEFK -
No, because event touch and player touch both call the same method to trigger the event. At that time, the event turns towards the player, and you can't tell whether it was triggered by a player touch or by an event touch.
The code I added is ONLY run on the event touch trigger.
How do you want to distinguish between events that do this and events that don't? I imagine you don't want ALL events with Event Touch trigger to behave this way. -
Hmm....I guess the easiest way would be to call a certain list of sounds.No, because event touch and player touch both call the same method to trigger the event. At that time, the event turns towards the player, and you can't tell whether it was triggered by a player touch or by an event touch.
The code I added is ONLY run on the event touch trigger.
How do you want to distinguish between events that do this and events that don't? I imagine you don't want ALL events with Event Touch trigger to behave this way.
[Character name here]-(Strike1, slap1, hit1 ,howl1, swing1, bite1)
[Jezla]-(Strike1, slap1, hit1 ,howl1, swing1, bite1)
Event Custom Script call:
Script: Jezla
I think naming and listing the sounds in the script would be the easiest way. Afterwards, use a script input and place the name within it for the event it's associated with.