Home   Help Search Login Register  

Author Topic: arggh  (Read 1138 times)

0 Members and 1 Guest are viewing this topic.

BRAVO-TWO

  • Guest
arggh
« on: 03 Jan 2006, 21:40:37 »
one more thing

trying to guarentee that if certain named russian unit is hit he will cry out (arggg)  and a trigger can be fired by this..

have  looked at the hit kill sqs in editors depot ..(usefull but not what i need)

i guess an event handler is the answer

unitname AddEventHandler ["hit",{_this exec "hit.sqs"}]

but what would i enter in my hit.sqs to force the unit to cry out..

                                     thanx guys

                                    shark attack

Lean Bear

  • Guest
Re:arggh
« Reply #1 on: 03 Jan 2006, 22:25:51 »
unitname say "soundfilename"

Perhaps?

I'm pretty sure BIS already has some "screaming in agony" sounds that you could find the name for. Then replace "soundfilename" with the BIS (or your own) "arrgghh" sound.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:arggh
« Reply #2 on: 03 Jan 2006, 23:24:12 »
You don't need to make the event handler run a script.  It can action the code directly:

unitname addEventHandler [{hit},(_this select 0) say "soundclassname"]

Be aware though if the hit kills him he won't say anything - dead units don't talk. :)

If you do want him to say something even when dead create a game logic at his location and get it to say the sound.  That can still all be done without needing to call a script.
« Last Edit: 03 Jan 2006, 23:28:04 by THobson »

Offline 456820

  • Contributing Member
  • **
Re:arggh
« Reply #3 on: 04 Jan 2006, 09:38:35 »
check out my killed and hit scripts its pretty much what you wanted apart from the sounds dont say "ARRRGGG" only "MEDIC" or "IM HIT" etc etc

here you go

You can edit the scripts to play sound files and change the text but give credits to the rest of the script as mine

BRAVO-TWO

  • Guest
Re:arggh
« Reply #4 on: 04 Jan 2006, 20:13:44 »
re...
check out my killed and hit scripts its pretty much what you wanted apart from the sounds dont say "ARRRGGG" only "MEDIC" or "IM HIT" etc etc

my post

trying to guarentee that if certain named russian unit is hit he will cry out (arggg)  and a trigger can be fired by this..

have  looked at the hit kill sqs in editors depot ..(usefull but not what i need)


BRAVO-TWO

  • Guest
Re:arggh
« Reply #5 on: 04 Jan 2006, 20:15:27 »
but thanx in anyway 456820

                              :cheers:nice one :cheers:


Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re:arggh
« Reply #6 on: 04 Jan 2006, 21:39:07 »
Can't you just use,

Condition: Getdammage Unitname >= 0.1
On Activation: Playsound "Soundfile"

Or better still,

On Activation: Unitname Say "Soundfile"
« Last Edit: 04 Jan 2006, 21:40:28 by The-Architect »
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."

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:arggh
« Reply #7 on: 10 Jan 2006, 01:08:36 »
Many triggers cause a lot of lag. I would suggest using eventHandlers because they decrease lag by the Terabyte ( ;D).

@THobson

Does that format work for eventHandlers? I always use addEventHandler ["hit",{(_this select 0) say "ivebeenshot.ogg"}]. But I'm no expert.
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:arggh
« Reply #8 on: 10 Jan 2006, 21:29:40 »
Neither am I . . . clearly.  I should have said:

unitname addEventHandler [{hit},{(_this select 0) say "soundclassname"}]

I missed the {} after the comma.  I know in many cases {...} and  "..." are equvalent, but not always.  Rather than try and remember I always use {...} for a block of code and "..." for a string.  

Except of course I break my own rule in an eventhandler where I use {hit} ::)

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:arggh
« Reply #9 on: 10 Jan 2006, 22:32:06 »
Go figure  ;D

"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08