[Untested] Rope Climbing Plugin

Discussion in 'Work In Progress' started by Kegan, Feb 3, 2018.

?

Rate this plugin

  1. Good

  2. Bad

  3. Terrible

  4. A Meme

Results are only viewable after voting.
  1. Kegan

    Kegan Developer Staff Member

    Joined:
    Jul 2, 2016
    Messages:
    30
    Likes Received:
    38
    [​IMG]

    Climb Ropes. It's simple.

    By throwing a specified weapon or shooting a specific ammo type a "grappling hook" can lower a rope down from any building. You can climb up that rope, but not down.

    Test this for me and let me know what is wrong. I haven't had a chance to test it yet.

    This is also a meme plugin. It's not meant to accurately portray rope climbing, but it is a foundation other people can build on.

    GitLab Link

    Here is the download link
     

    Attached Files:

    San likes this.
  2. Kegan

    Kegan Developer Staff Member

    Joined:
    Jul 2, 2016
    Messages:
    30
    Likes Received:
    38
    I seem to have no idea how attachments work. You can download an attachment or the link. They are all the same. Xd
     
  3. Kegan

    Kegan Developer Staff Member

    Joined:
    Jul 2, 2016
    Messages:
    30
    Likes Received:
    38
    Here is some testing code to know how it works. Just run this in the editor. and shoot/throw any weapon or grenade towards a rooftop.


    PHP:
    player addEventHandler ["Fired",{
        
    params["_unit","_weapon","_muzzle","_mode","_ammo","_magazine","_projectile","_gunner"];
        
    systemchat _weapon;
        
    systemchat typeof(_projectile);
      
        
    _vel velocity _projectile;
        
    _speed vectorMagnitude _vel;
        
    _newV = (getCameraViewDirection playervectorMultiply _speed;
      
        
    _newObj "B_UAV_01_F" createVehicle [0,0,0];  
        
    _newObj allowDamage false;
        
    _newObj disableCollisionWith player;
        
    _newObj setPosATL (getposatl _projectile);
        
    _newObj setVelocity _newV;
        
    _newObj enableRopeAttach true;
        
    deleteVehicle _projectile;
      
      

      
        
    _newObj addEventHandler ["EpeContact",{
            
    params["_newObj","_oldObj"];
            
    _newObj removeAllEventHandlers "EpeContact";
            [
    _newObj,getposatl _newObjspawn {
                
    params["_newObj","_pos"];
              
                
    _rope ropeCreate [_newObj,[0,0,0],1];
                
    _endPos = (ropeEndPosition _ropeselect 1;
                
    _len floor (_endPos select 2);
                
    ropeUnwind [_rope,5,_len,true];
              
                
    _newObj hideObject true;
                while{
    true} do {
                    
    _newObj setVelocity [0,0,0];
                    
    _newObj setPosATL _pos;
                    
    0.01;
                };
            };
        }];
    }];



    player addAction ["Climb Rope",{
      
        
    _nearestRope = (getpos playernearestObject "Rope";
      
        
    _bottom = ((ropeEndPosition _nearestRopeselect 1);
        
    _dist = ((getposatl playerdistance _bottom);
        
    systemchat str _dist;
        if(
    _dist 2then {
            [
    _nearestRopespawn {
                
    params["_rope"];
              
                
    ropeUnwind[_rope,5,-1*(ropeLength _rope),false];
              
                while{(
    ropeLength _rope) > 0.5} do {
                    
    _pos = (ropeEndPosition _ropeselect 1;
                    
    player setposatl _pos;
                    
    player setvelocity [0,0,0];
                    
    uiSleep 0.01;
                };
              
                
    ropeDestroy _rope;
                
    player setVelocity [3*sin(getdir player),3*cos(getdir player),5];
              
            };
        };
    }];

     
    B.A.D. likes this.
  4. B.A.D.

    B.A.D. Member

    Joined:
    Dec 21, 2017
    Messages:
    75
    Likes Received:
    16
    only thing so far would be in your install instructions.theyre saying you need to set the ammotype in pluginlist but its ropeclimb.cfg
     
  5. B.A.D.

    B.A.D. Member

    Joined:
    Dec 21, 2017
    Messages:
    75
    Likes Received:
    16
    ok its creating the uav but it wont be throwed up to anything,just stop where the players throw animation ends and create the rope there,then the climb rope action will fire you up like a meter and its over^^ 20180203170506_1.jpg 20180203170512_1.jpg
     

Share This Page