Home   Help Search Login Register  

Author Topic: Play sound after explosion  (Read 591 times)

0 Members and 1 Guest are viewing this topic.

Gooner861

  • Guest
Play sound after explosion
« on: 22 Oct 2004, 21:38:05 »
Ok so now i have a sound of a car alarm. Now i have a scene with a big explosion near sum cars, now wot i want is for AFTER the explosion for this car alarm sound to play.

Now i know how to get sounds into the game etc, i just dnt know wot code to use to play a sound after an explosion or to make it easier if a particular car has been destryoed.

Thanks

Gooner

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re:Play sound after explosion
« Reply #1 on: 22 Oct 2004, 23:31:03 »
If a particular car is destroyed by the explosion it is very simple indeed. Make a trigger and place an apropriate object on the map, on the location you want the alarm to sound from. Let us suppose you named the car myCar and the object myObject

C: !(alive myCar) or !(canMove myCar)
A: myObject say "nameOfSound"

Voila!

But I suppose you use some trigger to detonate your bomb in the first place, right? You can use the same trigger and add

;myObject say "nameOfSound"

after the command that activates the blast in the Activation field.
« Last Edit: 22 Oct 2004, 23:34:11 by nominesine »
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Play sound after explosion
« Reply #2 on: 27 Oct 2004, 23:35:08 »
first, you would want to make the line
myobject say "sound" to have mycar instead of myobject (the car is the one with the alarm)

and to get it after the explosion add:
playalarm=true
 
to the activation field of the trigger that calls the exposion and then make another trigger with playalarm as the condition with:

mycar say "sound"
in the activation field

sorry if thats a little hard to understand
i dont write much goodly

forgot to say put whatever delay into the second trigger that you want before the alarm plays
« Last Edit: 27 Oct 2004, 23:37:05 by Triggerhappy »

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re:Play sound after explosion
« Reply #3 on: 29 Oct 2004, 01:28:48 »
Sorry to disagree with you triggerhappy, but if the car "dies" in the explosion it wont obey when you order it to "say" the sound. That's why you need to make a different object "say" the name of the sound.

But then again, if you just want the sound to be heard, no mather where the player/camera is located, you can use "playSound" instead of "say". Then you don't need any object to start the alarm
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Play sound after explosion
« Reply #4 on: 29 Oct 2004, 02:31:59 »
well if a car "dies" it cant sound its alarm can it?

just an observation
« Last Edit: 29 Oct 2004, 02:33:38 by Triggerhappy »

Gooner861

  • Guest
Re:Play sound after explosion
« Reply #5 on: 29 Oct 2004, 12:25:34 »
But the surrounding cars will  :)

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Play sound after explosion
« Reply #6 on: 30 Oct 2004, 04:41:47 »
then perhaps the better thing to do is to make all the cars say the alarm

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re:Play sound after explosion
« Reply #7 on: 09 Nov 2004, 08:46:06 »
Or just leave OFP car alarm-free. I hate car alarms anyway. They always wake me up in the middle of the night, but the owner of the car never seems to react  ;D
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:Play sound after explosion
« Reply #8 on: 16 Nov 2004, 07:41:33 »
or more simply if the cars arent distroyed just detect if the car has been damaged and then use what trigger happy said