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

Solved move_rope, how to make it hangs


Post New Thread Reply   
 
Thread Tools Display Modes
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
backwards
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 12-16-2018 , 05:29   Re: move_rope, how to make it hangs
Reply With Quote #2

Try setting Subdiv to 4 and Slack to a higher value like 10 or 25.

Keyframe_rope

Quote:
Slack
How much extra length the rope has (by default it has the length between its two endpoints in the editor).
Quote:
Subdivision
Number of subdivisions between each rope segment. Maximum value is 8. Higher values make smoother ropes, but are slower to render.
__________________
I highly recommend joining the SourceMod Discord Server for real time support.
backwards is offline
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 12-16-2018 , 07:45   Re: move_rope, how to make it hangs
Reply With Quote #3

Slack 80
works good
thanks
Indarello 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 03:48.


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