Raised This Month: $12 Target: $400
 3% 

[Solved] Open the scientist's mouth.


Post New Thread Reply   
 
Thread Tools Display Modes
Lulu the hero
Senior Member
Join Date: Oct 2009
Location: Budapest, Hungary
Old 01-23-2011 , 09:45   Re: Open the scientist's mouth.
Reply With Quote #11

Oh, I remember now, just viewed a map yesterday, with scientist like hostages. When they said: "Okay, let's go" they mouth did not move. Is it because of cstrike, or is that sound not emitted from CHAN_VOICE?
Lulu the hero is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-23-2011 , 09:54   Re: Open the scientist's mouth.
Reply With Quote #12

I really don't know. Something is blocking the controllers because putting the scientist model on a dummy entity like info_target, it works fine. If you have nice ideas, I will appreciate for sure.

EDIT: Remember I'm using the scientist model, not the hostage one. For hostage model there is no mouth controller.
EDIT2: I think I know why, will try something.
__________________

Last edited by Arkshine; 01-23-2011 at 10:14.
Arkshine is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-23-2011 , 13:53   Re: Open the scientist's mouth.
Reply With Quote #13

Ok, I've found the solution.

It's funny to see the time passed on the problem when the solution is simple.
What is have bugged me is that, in CHostage:Spawn() :

SetBoneController(0, 0.0);
SetBoneController(1, 0.0);
SetBoneController(2, 0.0);
SetBoneController(3, 0.0);
SetBoneController(4, 0.0);

Notice the last line. Yes, controller should go from 0 to 3. Here, 4.

So I decide to play with SetBoneController() and when I do SetBoneController(3, 255.0), it returns 255.0.
Looking at the HLSDK, it returns your value either if the model pointer is invalid or the controller index was not found.
To understand, I've used the fakemeta version set_controller() and put some debug line to see the value of pbonecontroller->index and surprise, it returns 4.

Something you should see In HLMV, but you see "Mouth" instead as label. Looking at the HLMV code source, it appears there is a specific support for the mouth. So, 4 is for the mouth. By decompiling the model, you see well in the .qc : $controller 4 [...]. Reading the HLSDK(client), it seems this way is used to synchronize mouth movements.

So, the solution : Editing .qc file, changing 4 by a value <= 3, compiling and using a value between 0 and 64.

It works. .
__________________

Last edited by Arkshine; 01-23-2011 at 13:57.
Arkshine is offline
Lulu the hero
Senior Member
Join Date: Oct 2009
Location: Budapest, Hungary
Old 01-27-2011 , 14:15   Re: [Solved] Open the scientist's mouth.
Reply With Quote #14

Ooookay, but how about having a solution without editing the model? Or is it the only way?
Lulu the hero is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 01-27-2011 , 14:25   Re: [Solved] Open the scientist's mouth.
Reply With Quote #15

Offtopic

Arkshine you're making MonsterAI?
__________________
xbatista is offline
Send a message via Skype™ to xbatista
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-27-2011 , 14:25   Re: [Solved] Open the scientist's mouth.
Reply With Quote #16

Since there are only 4 controllers, and you can't use with "4", and you can't trigger server-side, I guess you have no choice to edit the model because it seems to be a a client-side's feature for HL singleplayer.

EDIT : No, sorry, xbatista. It's something I wanted to use in my unfinished plugin "Scientist Shotgun".
__________________

Last edited by Arkshine; 01-27-2011 at 14:28.
Arkshine is offline
Lulu the hero
Senior Member
Join Date: Oct 2009
Location: Budapest, Hungary
Old 01-27-2011 , 14:44   Re: [Solved] Open the scientist's mouth.
Reply With Quote #17

Can't the controllers be reached by some other way? Some kind of offsets maybe?
Lulu the hero is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-27-2011 , 15:01   Re: [Solved] Open the scientist's mouth.
Reply With Quote #18

I don't think. The "5th controller" feature is something handled by the client. The model is parsed and detects you use $controller 4. Here we are in a multiplayer environnement and I don't remember seeing a function related to that in the engine dll. But I could may wrong. Good luck to find another way.
__________________
Arkshine is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:20.


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