AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Solved] Open the scientist's mouth. (https://forums.alliedmods.net/showthread.php?t=105336)

Arkshine 10-03-2009 14:41

[Solved] Open the scientist's mouth.
 
Hi,

I'm using 'monster_scientist' in a plugin which will be released soon, entity which is actually a real hostage. The problem is he don't want to open his mouth.

I've tried : pev_controller, set_controller(), ES_Controller ; nothing work.

As notes : the scientist bone controller is 1, and using a generic entity ( info_target ) + scientist model, it works fine. So it sounds like it's blocked somehow.

Any ideas are welcomed.

Thanks~

ConnorMcLeod 10-03-2009 14:51

Re: Open the scientist's mouth.
 
As hostages are not the same in cs:cz than in cs1.6, they may be different in cs1.6 than hl scientists.
Nothing in joaquim's module that could help you ?

Arkshine 10-03-2009 14:57

Re: Open the scientist's mouth.
 
SetBoneController() is the same as set_controller(). And I see nothing interesting except that.

Also it uses the HL scientist model by default.

fireattack 08-15-2010 12:21

Re: Open the scientist's mouth.
 
Look MonsterMod code

Arkshine 08-15-2010 12:27

Re: Open the scientist's mouth.
 
Why should I look there and what should I search ?

monster_scientist is the same as hostage_entity, except the model which changes. The model/entity is handled by CS. He has nothing to do with the entity (monster) handled by HL1 in singleplayer or MonsterMod.

I have not tried since, but I could try to hook SetBoneController().

fireattack 08-15-2010 12:35

Re: Open the scientist's mouth.
 
Search this on "scientist.cpp"

PHP Code:

void CMScientist :: Precachevoid 


Arkshine 08-15-2010 12:56

Re: Open the scientist's mouth.
 
I'm not sure you understand what I'm trying to do.

I want to use the monster_scientist entity which exists in CS ( actually it's just a real hostage with scientist model ) and opening his mouth while running for example. I want to deal with the CS Hostage AI which is different than a real HL1 monster entity.

But thanks to you, it gives me new ideas to check. ;)

Lulu the hero 01-23-2011 09:15

Re: Open the scientist's mouth.
 
There would be a neat way to open a mouth without the pev_controller thingy( and I agree, if you view the model of the scientist in HL model viewer, then you can open it's mouth with one of the controllers ). For the idea, please note, that when an entity emits a sound from the CHAN_VOICE channel, the mouth opens according to the amplitude of the volume. This means you need the scientist to emit a sound. You just need a very loud and constant frequency sound. If you don't want that sound to be heard, then try using ultrasound(>16000Hz), or infrasound(<16Hz). And if you still want the scientist to emit a sound, like a screaming, then just use a different unoccupied channel. If you would like, I could try and make an audio for you with cool edit pro( gonna post it here later ).

Lulu the hero 01-23-2011 09:35

Re: Open the scientist's mouth.
 
1 Attachment(s)
Okay, I couldn't make the 20kHz sound, but here is a 16Hz wav for you.
It lasts for 0.98 secs, but I can make it longer, if needed. Just let the scientist emit this sound, and controll the mouth opening with the volume parameter( the louder sound, the wider mouth opening ).

Arkshine 01-23-2011 09:38

Re: Open the scientist's mouth.
 
I'm using sounds like scientist_scream/screamXX.wav with CHAN_VOICE, like :

PHP Code:

UTIL_EmitAmbientSound
(
    .
entity      Entity,
    .
channel     CHAN_VOICE,
    .
sample      ScientistScreamSoundsrandomsizeofgScientistScreamSounds ) ) ],
    .
volume      VOL_NORM,
    .
attenuation ATTN_NORM,
    .
flags       0,
    .
pitchs      PITCH_NORM
); 

I don't remember seeing it was working. Maybe the sound is too short or I have not looket at the scientist properly. Will try again another time.


All times are GMT -4. The time now is 04:51.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.