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

Problem with prop_ragdoll


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Facksy
Senior Member
Join Date: Apr 2017
Location: +2+2
Old 08-04-2018 , 16:15   Problem with prop_ragdoll
Reply With Quote #1

hello guys im actually trying to create a prop_ragdoll and to set velocity on it on spawn but something weird happen instead, here is the code:
Code:
void CreateRagdoll(float ori[3])
{
    int dynamic = CreateEntityByName("prop_ragdoll");
    DispatchKeyValue(dynamic, "model", "models/player/demo.mdl");
    //DispatchKeyValue(dynamic, "spawnflags", "4");
    DispatchKeyValue(dynamic, "skin", "0");
    ActivateEntity(dynamic);
    DispatchSpawn(dynamic);
    float vel[3];
    vel[0] = GetRandomFloat(300.0, 400.0);
    vel[1] = GetRandomFloat(300.0, 400.0);
    vel[2] = GetRandomFloat(3000.0, 4000.0);
    TeleportEntity(dynamic, ori, NULL_VECTOR, vel);
}

Here the prop spawn with no velocity and when I jump on it I receive this velocity.
__________________
My Steam I take private requests if related with TF2
My Plugins

Last edited by Facksy; 08-04-2018 at 16:17.
Facksy is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 08-04-2018 , 17:03   Re: Problem with prop_ragdoll
Reply With Quote #2

Makes me wonder if tf_ragdoll has the same problem.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 08-04-2018 , 17:07   Re: Problem with prop_ragdoll
Reply With Quote #3

L4d2 is similar besides the bouncy effect.
settings vec velocity does nothing however explosions do effect it causing movement -_- valve troll?
__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D
Lux 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 07:47.


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