OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: GingaWRATH on 07 Jul 2005, 11:00:26

Title: Unit SAY!
Post by: GingaWRATH on 07 Jul 2005, 11:00:26
I am having problems making a Unit Scream.

My Idea is using Eventhandler killed or Hit run a script with _unit say "scream"

Ive got no error msgs and also No SCREAM!  :(

My event handler inside each units INIT field = this addeventhandler ["hit", {_this exec "aier\scream1.sqs"}]

My script =

_unit = _this select 0

_unit say "scream"

exit

Im so confused :(
Title: Re:Unit SAY!
Post by: GingaWRATH on 07 Jul 2005, 11:03:16
Just incase you was wondering I run my scripts for the scrams from another folder "aier". thats why the script is ran "aier\scream1.sqs"

Title: Re:Unit SAY!
Post by: sim on 07 Jul 2005, 11:23:06
Erm just wondering if you have defined the sound scream in your description.ext?
Title: Re:Unit SAY!
Post by: GingaWRATH on 07 Jul 2005, 11:25:52
I think so.. :)
Title: Re:Unit SAY!
Post by: THobson on 07 Jul 2005, 11:27:03
A dead unit cannot say anything, and you are only activating the say command when the unit is dead.

Could this be the problem?
Title: Re:Unit SAY!
Post by: GingaWRATH on 07 Jul 2005, 11:27:38
Well ive tryed Hit as my handle but still no response
Title: Re:Unit SAY!
Post by: THobson on 07 Jul 2005, 11:28:19
The hit may kill him.

Try playsound instead of say

The direction and volume of the sound will not be correct but it would at least rule out this as a problem
Title: Re:Unit SAY!
Post by: GingaWRATH on 07 Jul 2005, 11:29:29
Sry actually it could be the D.EXT ive just retryed with out and No error msg sry
Title: Re:Unit SAY!
Post by: GingaWRATH on 07 Jul 2005, 11:31:42
Maybe you can tell me whats wrong with it. I have 12 different screams named s1 -s12.  ( that might be a prob right there lol)
Title: Re:Unit SAY!
Post by: sim on 07 Jul 2005, 11:34:31
Hmm just had a look at your description a bit different to any of mine. Are you having problems with any of your other sounds?
Title: Re:Unit SAY!
Post by: GingaWRATH on 07 Jul 2005, 11:36:10
The Playsound worx but still no Say
Title: Re:Unit SAY!
Post by: GingaWRATH on 07 Jul 2005, 11:38:37
do u think i need a .lip file?

I doubt this but i use _unit say "eng1"-"42" all the time and these all have .lipfiles with them. (found in the Sound.pbo file)
Title: Re:Unit SAY!
Post by: GingaWRATH on 07 Jul 2005, 11:42:09
Ive shot the guy 1 time with the script set to _unit say "eng20" (for the gogogo sound)

and it repeates gogogo 1 time giving me 2 gogogos 1 after eachother hmm. But at leat this worx so im veryconfused as why s1 dont
Title: Re:Unit SAY!
Post by: GingaWRATH on 07 Jul 2005, 11:47:34
Im almost out of Ideas. I got some Kickass Screaming Here.. :(

Maybe I could try one of your D.ext just for my brains sake.
Title: Re:Unit SAY!
Post by: THobson on 07 Jul 2005, 12:24:05
I thought you found the answer.  Playsound works - so you have no problem with the sound file or description.ext.

Say does not work with dead units and you want a dead unit to scream - it won't happen.

Try creating a Game Logic at the location of the unit at the point of death and get the game Logic to say the scream.
Title: Re:Unit SAY!
Post by: GingaWRATH on 07 Jul 2005, 12:28:28
ahhh cleaver guy lol.

So Im gonna make 12 Gamlogics that can be setpos getpos arouns dead units since I have a different Scream for Each group unit.

lemme C..

So now my script would be :

_unit = _this select 0

Gamelogicname setpos getpos _unit
~0.2
Gamelogicname say "scream"

exit


that sound good? or you gotta better way?

Title: Re:Unit SAY!
Post by: GingaWRATH on 07 Jul 2005, 12:36:51
It was a Great Idea but still no Screaming.. Never mind thanx for the Help Im sure it will be a fine Mission Without this :( lol
Title: Re:Unit SAY!
Post by: THobson on 07 Jul 2005, 12:55:59
I can't see why it would not work.

Try

hint format ["%1",_unit]

to see if _unit is defined.

Also:  are you close enough to hear the scream when the GL says it?
Title: Re:Unit SAY!
Post by: GingaWRATH on 07 Jul 2005, 13:46:11
Stood next to the guy and nothing. I added a Hint earlyer and it should all work.  All ive done now is Used rus2.3.4.5.8.13 to get a lesser effect.

its koo Guys Thanx for ya efforts.
Title: Re: Unit SAY!
Post by: Chammy on 19 Aug 2006, 03:19:53
Im not sure if this has been suggested,

you might want to check on your ogg file, u might have an error in it,

 your volume might not be assined properly or raised in it

you might have a little space in the declaration of the sound

or could just be what the other guy said, unit dead = no sound.

Title: Re: Unit SAY!
Post by: JasonO on 19 Aug 2006, 13:34:23
Im not sure if this has been suggested,

you might want to check on your ogg file, u might have an error in it,

 your volume might not be assined properly or raised in it

you might have a little space in the declaration of the sound

or could just be what the other guy said, unit dead = no sound.



Yes the OGG file might not work ive had this problem... but I dont think it matters since this topic is over 1 year old ;)