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

Solved move_rope, how to make it hangs


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 12-16-2018 , 02:51   move_rope, how to make it hangs
Reply With Quote #1

Somebody know how to make rope hang a bit?
- m_RopeLength (Offset 936) (Save)(4 Bytes)
I think it should do it, but dont know how to change it
PHP Code:
SpawnRopeFloat:nodes[][ ], NodeCount, const String:NodePrefix[], const String:RopeMaterial[] = "cable/cable.vmt"Float:width 2.0slack 0bool:LastNodeToFirst false )
{
    if( 
NodeCount )
        return 
0;
    
    new 
enti;
    
decl String:NodeName64 ], String:NextNodeName64 ];
    for(; 
NodeCounti++ )
    {
        if( 
== )
            
ent CreateEntityByName"move_rope" );
        else
            
ent CreateEntityByName"keyframe_rope" );
        
        if( !
IsValidEntityent ) )
            return 
i;
        
        
FormatNodeNamesizeofNodeName ), "%s%d"NodePrefix);
        
        if( 
NodeCount )
            
FormatNextNodeNamesizeofNextNodeName ), "%s%d"NodePrefix);
        else
        {
            if( 
LastNodeToFirst )
                
FormatNextNodeNamesizeofNextNodeName ), "%s0"NodePrefix );
            else
                
strcopyNextNodeNamesizeofNextNodeName ), "" );
        }
        
        
DispatchKeyValueent"targetname"NodeName );
        
DispatchKeyValueent"NextKey"NextNodeName );
        
DispatchKeyValueent"RopeMaterial"RopeMaterial );
        
DispatchKeyValueFloatent"Width"width );
        
DispatchKeyValueent"Slack""1" );
        
DispatchKeyValueent"Type""0" );
        
DispatchKeyValueent"TextureScale""1" );
        
DispatchKeyValueent"Subdiv""2" );
        
DispatchKeyValueFloatent"m_RopeLength"10.0 );           //this should change rope length? - m_RopeLength (Offset 936) (Save)(4 Bytes)
        
DispatchKeyValueent"MoveSpeed""0" );
        
DispatchKeyValueent"Dangling""0" );
        
DispatchKeyValueent"Collide""0" );
        
DispatchKeyValueent"Breakable""0" );
        
DispatchKeyValueent"Barbed""0" );
        
DispatchSpawnent );
        
TeleportEntityentnodes], NULL_VECTORNULL_VECTOR );
        
        
CreateTimer0.1Timer_ActivateEntityent );
    }
    
    return 
i;

Attached Images
File Type: jpg 321.jpg (93.3 KB, 328 views)

Last edited by Indarello; 12-29-2018 at 01:59.
Indarello is offline
 



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 15:27.


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