Home   Help Search Login Register  

Author Topic: One man charge yell  (Read 1205 times)

0 Members and 1 Guest are viewing this topic.

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
One man charge yell
« on: 18 Jul 2006, 00:40:42 »
I am making some kind of one man charges from the enemy that occur durring the mission where an enemy comes out of the bushes and charges the players position, problem is, I have them yelling,(like ahhhhhhhhhhhhhhhhhhhhh!) when they charge, they are almost always cut down by one of the players teammates before they get to close but after they die, the yelling sound continues, how do I end the yelling abrptly right as the soldier is shot.

thanks 

Offline Cheetah

  • Former Staff
  • ****
Re: One man charge yell
« Reply #1 on: 18 Jul 2006, 08:52:35 »
Check in a loop if the soldiers is still alive, if he's toasted, end the sound. But I don't know how to properly stop the sound, fadeSound isn't a good solution if you ask me.
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re: One man charge yell
« Reply #2 on: 18 Jul 2006, 17:53:00 »
yeah thats the problem i know

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re: One man charge yell
« Reply #3 on: 18 Jul 2006, 23:20:37 »
Make the sound shorter (like about .25 seconds) then run the sound in a loop like this:

Code: [Select]
_charger = _this select 0

;this will make the charger scream for 5 seconds
_tmlim = _time + 5

#loop
? alive _charger : _charger say "scream"
~ .25
? _time < _tmlim && alive _charger : goto "loop"
exit

"scream" is the name of the sound, change it to whatever you want to name your sound.
_charger is the dude who is charging out of the bushes. Make him run this script by puting this in the trigger or waypoint or whatever you are using to signal him to attack:

Code: [Select]
[dude] exec "scream.sqs"

Dude is the editor name for the attacking man, make it whatever name you want. Also you can name the script something other than "scream".

Good luck.

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re: One man charge yell
« Reply #4 on: 19 Jul 2006, 03:39:27 »
haha, rapto that sounds so funny. it sounds like a screaming MG.
but it is not sutable, is there aanother way to do this besides editing the sound, maby a comand that can end it?




By the way raptosaurus: I PMed you but you havent responded,
please send me the Planes in valley by email

Offline MrN

  • Contributing Member
  • **
  • Pffff
Re: One man charge yell
« Reply #5 on: 19 Jul 2006, 12:27:49 »
IIRC when another sound is played the first sound will be stopped. Although I can't test it because my main box had a HDD failure so I could be wrong.

So, try adding a killed eventhandler and say either a silent ogg to stop the sound or find a groan/grunt sort of sound that'll end the screaming charge.

In the 60's, people took acid to make the world weird. Now the world is weird and people take Prozac to make it normal.

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: One man charge yell
« Reply #6 on: 19 Jul 2006, 15:20:16 »
Um, my experience is that sounds using the say command get fifo(First In First Out) queued. If the sound file is long, it will play itself out, nothing you can do about it. If a unit is told to say several sounds in succession without a pause between them, each sound will eventually play in turn.  Solution, make sure your pauses between say commands are slightly longer than the sounds themselves. The say command will not work one a unit once it is dead, but all say commands issued before the unit is dead will still be played.

If you want to make a dead man speak, however, setPos a game logic to his position and make it say the sound. I discovered this when trying to make a dead man fart.
« Last Edit: 19 Jul 2006, 15:28:05 by Mr.Peanut »
urp!

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re: One man charge yell
« Reply #7 on: 19 Jul 2006, 16:59:56 »
Config the yell as a music file instead of a sound file. Then FadeMusic.
Or cut the sound into sections and script each like 0.5 secs to have a check after it.
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."