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

can't animate model..


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 08-28-2016 , 08:37   can't animate model..
Reply With Quote #1

i ripped the frostdrake model from ze_frostdrake_tower_v1 and try playing around with it
but i can't animate it

PHP Code:
        new frostdrake CreateEntityByName("prop_dynamic");
        
DispatchKeyValue(frostdrake "targetname""frostdrake");
        
DispatchKeyValue(frostdrake "disableshadows""1");
        
DispatchKeyValue(frostdrake "model""models/luff_frostdrake/luff_frostdrake.mdl");
        
DispatchSpawn(frostdrake );
        
SetEntPropFloat(frostdrake Prop_Send"m_flModelScale"0.5);
        
SetVariantString("fly1");
        
AcceptEntityInput(frostdrake "SetAnimation", -1, -10); 
__________________

Last edited by 8guawong; 08-28-2016 at 10:01.
8guawong is offline
Michael Shoe Maker
Senior Member
Join Date: Apr 2016
Old 08-28-2016 , 09:33   Re: can't animate model..
Reply With Quote #2

Is the model visable? Because I'm pretty sure you can't use prop_dynamic post-map compile.
Michael Shoe Maker is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 08-28-2016 , 10:00   Re: can't animate model..
Reply With Quote #3

Quote:
Originally Posted by Michael Shoe Maker View Post
Is the model visable? Because I'm pretty sure you can't use prop_dynamic post-map compile.
yes

i tried prop_dynamic_overide as well
__________________

Last edited by 8guawong; 08-28-2016 at 10:01.
8guawong is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 08-28-2016 , 10:06   Re: can't animate model..
Reply With Quote #4

Try precaching the model, most game models need to be precached for the animations to work.
cravenge is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 08-28-2016 , 10:24   Re: can't animate model..
Reply With Quote #5

Quote:
Originally Posted by cravenge View Post
Try precaching the model, most game models need to be precached for the animations to work.
no... i did that already onmapstart
__________________
8guawong is offline
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 08-29-2016 , 04:09   Re: can't animate model..
Reply With Quote #6

I don't see any mistakes here. Try to reproduce this prop in the Hammer editor and copypast all the ent settings from the source *.vmf file to your sp. You may missed some render params or something is wrong with your teleport code.

Last edited by kadet.89; 08-29-2016 at 04:15.
kadet.89 is offline
Send a message via Skype™ to kadet.89
Mitchell
~lick~
Join Date: Mar 2010
Old 08-29-2016 , 09:18   Re: can't animate model..
Reply With Quote #7

Try prop_physics_override and making it disable movement.
Mitchell is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 08-29-2016 , 11:31   Re: can't animate model..
Reply With Quote #8

Quote:
Originally Posted by kadet.89 View Post
I don't see any mistakes here. Try to reproduce this prop in the Hammer editor and copypast all the ent settings from the source *.vmf file to your sp. You may missed some render params or something is wrong with your teleport code.
don't really know how to use hammer
__________________
8guawong is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 08-29-2016 , 11:32   Re: can't animate model..
Reply With Quote #9

Quote:
Originally Posted by Mitchell View Post
Try prop_physics_override and making it disable movement.
tried prop_physics_override and still nothing

donno how to disable movement...
__________________
8guawong is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 08-29-2016 , 11:38   Re: can't animate model..
Reply With Quote #10

i've included the test code and the files (materials/models)
if any1 wanna give it a try
PHP Code:
#include <sdktools>

new frostdrake;

public 
OnPluginStart()
{
    
HookEvent("player_jump"jump);
}

public 
OnMapStart()
{
    
PrecacheModel("models/luff_frostdrake/luff_frostdrake.mdl");
}

public 
jump(Handleevent, const Stringname[], bool:dontBroadcast)
{
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    
decl Float:pos[3];
    
GetClientEyePosition(clientpos);
    
frostdrake CreateEntityByName("prop_physics_override");
    
DispatchKeyValue(frostdrake"targetname""frostdrake");
    
DispatchKeyValue(frostdrake"disableshadows""1");
    
DispatchKeyValue(frostdrake"model""models/luff_frostdrake/luff_frostdrake.mdl");
    
DispatchSpawn(frostdrake);
    
SetEntPropFloat(frostdrakeProp_Send"m_flModelScale"0.5);
    
SetVariantString("fly1");
    
AcceptEntityInput(frostdrake"SetAnimation", -1, -10);  
    
AcceptEntityInput(frostdrake"TurnOn"frostdrakefrostdrake0);
    
TeleportEntity(frostdrakeposNULL_VECTORNULL_VECTOR);
    
}

public 
OnGameFrame()
{
    if (
IsValidEntity(frostdrake))
    {
        
SetVariantString("fly4");
        
AcceptEntityInput(frostdrake"SetAnimation", -1, -10);  
        
AcceptEntityInput(frostdrake"TurnOn"frostdrakefrostdrake0);            
    }

Attached Files
File Type: zip csgo.zip (1,004.7 KB, 57 views)
__________________

Last edited by 8guawong; 08-29-2016 at 11:39.
8guawong 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 05:22.


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