Raised This Month: $ Target: $400
 0% 

[SOLVED] env_smokestack on client body


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Gugie
Member
Join Date: Jul 2012
Old 11-17-2013 , 19:32   [SOLVED] env_smokestack on client body
Reply With Quote #1

Well, i made a effect on client with code below:

PHP Code:
    new entity CreateEntityByName("env_smokestack");
    
DispatchKeyValue(entity"BaseSpread""25");
    
DispatchKeyValue(entity"SpreadSpeed""100");
    
DispatchKeyValue(entity"Speed""5000");
    
DispatchKeyValue(entity"StartSize""4");
    
DispatchKeyValue(entity"EndSize""4");
    
DispatchKeyValue(entity"Rate""5000");
    
DispatchKeyValue(entity"JetLength""80");
    
DispatchKeyValue(entity"SmokeMaterial""effects/spark_noz.vmt");
    
DispatchKeyValue(entity"twist""1");
    
DispatchKeyValue(entity"rendercolor""140 140 255");
    
DispatchKeyValue(entity"renderamt""1");
    
DispatchKeyValue(entity"roll""0");
    
DispatchKeyValue(entity"InitialState""1");
    
DispatchKeyValue(entity"angles""0 0 0");
    
DispatchKeyValue(entity"WindSpeed""0");
    
DispatchKeyValue(entity"WindAngle""0");
    
GetClientAbsOrigin(clientpos_client);
    
TeleportEntity(entitypos_clientNULL_VECTORNULL_VECTOR);
    
DispatchSpawn(entity);
    
AcceptEntityInput(entity"TurnOn");
    
SetVariantString("!activator");
    
AcceptEntityInput(entity"SetParent"cliententity); 
Entity spawn at player body and moves with player aim. Like when i look a bit lower, entity moves lower too and it's already not at my body and tilted. But i want to hold entity at player body and i don't want entity to move with aim. So i tried SetParentAttachment.

PHP Code:
    SetVariantString("rfoot");
    
AcceptEntityInput(entity"SetParentAttachment"); 
But i found only rfoot and forward. Forward is too high and rfoot is too low. (also moves with foot direction that's bad) I didn't find anything with body =(

So the question, How can i hold env_smokestack at player body?

Last edited by Gugie; 11-19-2013 at 04:54.
Gugie is offline
Gugie
Member
Join Date: Jul 2012
Old 11-18-2013 , 03:23   Re: env_smokestack on client body
Reply With Quote #2

Well basically it's a ring at player body


And when i move aim, this ring moves with aim =(


I don't know another ways to create a ring at player body that will follow him so i use env_smokestack. But if anybody knows another way, it will be cool xD (or will help to solve this one)

Thanks.

Last edited by Gugie; 11-18-2013 at 03:24.
Gugie is offline
hamilton5
Veteran Member
Join Date: Oct 2012
Location: USA
Old 11-18-2013 , 04:34   Re: env_smokestack on client body
Reply With Quote #3

uh, well, the beacon from funcommands comes to mind..
hamilton5 is offline
Gugie
Member
Join Date: Jul 2012
Old 11-18-2013 , 04:53   Re: env_smokestack on client body
Reply With Quote #4

beacon using TE_SetupBeamRingPoint, but it doesn't follow player. And even if create timer and update it, it will looks much worse than env_smokestack =(
Gugie is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 11-18-2013 , 06:32   Re: env_smokestack on client body
Reply With Quote #5

If you run ...\steamapps\common\Counter-Strike Source\bin\hlmv.exe (half life model viewer)
>Load (Steam)model

You maybe need create empty folders so it find game models inside VPK (don't ask why, just do it) :
\steamapps\common\Counter-Strike Source\models\player
\steamapps\common\Counter-Strike Source\bin\models\weapon

Then you find model own attachments - tab,
try play animations and look witch attachments is better.

maybe primary and grenade0 ... grenade3,
or CT = defuser, T = c4.
It also depend models what attachments it have or haven't.

You could try use SetParentAttachmentMaintainOffset instead

Last edited by Bacardi; 11-18-2013 at 06:34.
Bacardi is offline
Gugie
Member
Join Date: Jul 2012
Old 11-18-2013 , 07:06   Re: env_smokestack on client body
Reply With Quote #6

primary, granade0 ... grenade3, defuser and c4 a bit tilted and higher than body =(
I tried both SetParentAttachment and SetParentAttachmentMaintainOffset =(
Gugie is offline
Bimbo1
Senior Member
Join Date: Jan 2010
Location: brazil
Old 11-18-2013 , 07:35   Re: env_smokestack on client body
Reply With Quote #7

make 2 entities like that. the first one parented to the player and transmited to everyone but the player with it parented and the second one teleported every frame to the player position and transmit it only to him. i think it's the best you can do.
__________________
sie sind das essen und wir sind die jäger!
Bimbo1 is offline
Gugie
Member
Join Date: Jul 2012
Old 11-19-2013 , 04:54   Re: env_smokestack on client body
Reply With Quote #8

Thanks, works)
Gugie is offline
Bimbo1
Senior Member
Join Date: Jan 2010
Location: brazil
Old 11-19-2013 , 08:21   Re: [SOLVED] env_smokestack on client body
Reply With Quote #9

bitte
__________________
sie sind das essen und wir sind die jäger!
Bimbo1 is offline
Reply



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 12:33.


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