YesNoOk
avatar

No hitsound when bomb hits the floor. (Read 7918 times)

Started by レオンハルト, April 12, 2018, 11:25:56 pm
Share this topic:
No hitsound when bomb hits the floor.
#1  April 12, 2018, 11:25:56 pm
  • ***
  • "Let Us Cling Together."
My character throws a bomb projectile in the air, when the bomb hits and explodes on the floor, there is no hitsound playback.

[State 1400, 2]
type = Playsnd
trigger1 = MoveContact
value = s1000,2

This controller does not work. I've tried Pos Y, Movehit, Animtime = 0, and anim so far nothing works.
Re: No hitsound when bomb hits the floor.
#2  April 13, 2018, 06:38:30 am
  • ****
    • Peru
Movecontact refers to whenever your move makes contact with the enemy (whether it's a successful hit or a guarded move) or anything belonging to the enemy, such as a projectile. It does not refer to anything belonging to the stage. You also have movehit, which refers to a successful hit on an opponent, or moveguarded, which refers to the move being blocked.

To make the bomb play the sound, you need the following conditions:

-Make sure the bomb is traveling downward (vel y > 0).
-Make sure the bomb has reached the ground (pos y >= 0), 0 being the Y position for the ground.

So you would have something like this:

[State 1400, 2]
type = Playsnd
trigger1 = pos y >= 0 && vel y > 0
value = s1000,2
Millie, "Ozy and Millie" said:
"I think there are really three types of people: "Glass is half-full" sorts of people, "Glass is half-empty" sorts of people,
and people who will spit into the glass until that's fixed."
Re: No hitsound when bomb hits the floor.
#3  April 13, 2018, 07:08:51 am
  • ****
  • Cute Bounty Hunter
If the bomb's an actual projectile, then I don't think there's a way to make projectiles play sounds when they dissipate without hitting anything.  If it's a helper, then just do like what he already said; whatever trigger you used to make the bomb explode, just use those same triggers on the PlaySnd.
Re: No hitsound when bomb hits the floor.
#4  April 13, 2018, 08:59:59 pm
  • ***
  • "Let Us Cling Together."
[State 1400, 2]
type = Playsnd
trigger1 = pos y >= 0 && vel y > 0
value = s1000,2

This controller doesn't work either. Maybe I should try to make the bomb as a helper projectile instead?
Re: No hitsound when bomb hits the floor.
#5  April 13, 2018, 11:53:49 pm
  • ****
  • Cute Bounty Hunter
So it was a pure projectile?  Yeah, try it as a helper.
Re: No hitsound when bomb hits the floor.
#6  April 14, 2018, 12:04:01 am
  • ***
  • "Let Us Cling Together."
I don't like making the projectiles as helpers. Bomb hits floor with projheightbound = -240,-12. I've also tried to have the sound play when anim = 1004.
I wanted to sound to play every time that animation plays?
Re: No hitsound when bomb hits the floor.
#7  April 14, 2018, 05:34:04 am
  • ****
    • Peru
Sadly, you yourself are already seeing one of the cons of making a single projectile state controller. Helper projectiles just give you that much more versatility.

Just give it a hitdef and use the same conditions for an explod with the explosion animation and the playsnd, and include movecontact and the conditions I told you about.

If you get stuck with the helper, feel free to post the code right here and let us look into it.
Millie, "Ozy and Millie" said:
"I think there are really three types of people: "Glass is half-full" sorts of people, "Glass is half-empty" sorts of people,
and people who will spit into the glass until that's fixed."
Re: No hitsound when bomb hits the floor.
#8  April 14, 2018, 05:45:00 am
  • ***
  • "Let Us Cling Together."
[Statedef 1400]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 50
velset = 0,0
anim = 1100
ctrl = 0

[State 1400, 0]
type = Playsnd
trigger1 = Time = 0
value = s1000,1

[State 1400, 1]
type = Projectile
trigger1 = Time = 0
projanim = 1003
projhitanim = 1004
projid = 1003
projpriority = 3
projshadow = 0
projheightbound = -240,-12
projedgebound = 40
projscreenbound = 40
projshadow = 0
offset = 15,-18
Velocity = 2.5,-3
accel = 0,0.4
attr = A, SP
animtype = Heavy
damage = 100
guardflag = MA
hitflag = MAFDP
priority = 4, Hit
pausetime = 0,0
hitsound = s1000,2
guardsound = s1000,2
sparkno = -1
ground.type = High
ground.slidetime = 25
ground.hittime  = 25
ground.velocity = -3,-5
air.animtype = Back
air.velocity = -3,-5
air.juggle = 3
air.fall = 1
down.velocity = -3,-5
down.hittime = 30
down.bounce = 0
fall = 1

[State 1400, 3]
type = Playsnd
trigger1 = Anim = 1004
value = s1000,2
Re: No hitsound when bomb hits the floor.
#9  April 14, 2018, 06:57:53 am
  • ****
  • Cute Bounty Hunter
Yeah, that PlaySnd s1000,2 isn't ever gonna happen since it's checking if the player and not the projectile is in anim 1004.  If you really want that bomb to make a sound when it impacts the floor and not just the opponent, it must be a helper.
Re: No hitsound when bomb hits the floor.
#10  April 14, 2018, 07:24:54 am
  • ***
  • "Let Us Cling Together."
Yeah I'll try to play around with a helper projectile. Even if I put the Playsnd in State -2 or -3 doesn't work either.
Re: No hitsound when bomb hits the floor.
#11  April 14, 2018, 02:21:29 pm
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
Helpers won't read the -2 and -3 states
XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!
Re: No hitsound when bomb hits the floor.
#12  April 14, 2018, 07:22:25 pm
  • ******
My character throws a bomb projectile in the air, when the bomb hits and explodes on the floor, there is no hitsound playback.

[State 1400, 2]
type = Playsnd
trigger1 = MoveContact
value = s1000,2

This controller does not work. I've tried Pos Y, Movehit, Animtime = 0, and anim so far nothing works.
MoveContact does not apply to Projectiles.

Use ProjContact to make the sound activate.
Re: No hitsound when bomb hits the floor.
#13  April 14, 2018, 08:16:13 pm
  • ***
  • "Let Us Cling Together."
ProjContact1003 = 1 will only work if it hits P2...
Re: No hitsound when bomb hits the floor.
#14  April 14, 2018, 08:43:49 pm
  • ******
That's because P1 is being knocked out of the state, so the PlaySnd won't activate.

Put the PlaySnd in Statedef -3
Re: No hitsound when bomb hits the floor.
#15  April 14, 2018, 09:14:39 pm
  • ***
  • "Let Us Cling Together."
Won't even activate under Statedef -3 either... The sound should activate every time anim = 1004 (explosion) plays.
Re: No hitsound when bomb hits the floor.
#16  April 14, 2018, 09:56:18 pm
  • ******
ProjContact doesn't work on self-contact, forgot about that. :P

Anim=1004 trigger won't work since that checks if P1 is in that animation, not the projectile.

Only other way to make it work is to use a variable to detect if the projectile is active or not, and use that to activate the PlaySnd. That'll require the NumProj state controller. That's the sucky limitation of using projectiles over helpers.
Re: No hitsound when bomb hits the floor.
#17  April 16, 2018, 03:58:20 am
  • ***
  • "Let Us Cling Together."
Yeah I guess making the projectile as a helper works out. Thanks for your time everyone!