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

[Build Command] - Move Prop by Mouse


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Stugger
Member
Join Date: Sep 2007
Plugin ID:
6690
Plugin Version:
1
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    A command for moving props via mouse position rather than player position
    Old 08-26-2019 , 05:00   [Build Command] - Move Prop by Mouse
    Reply With Quote #1

    Tested on HL2DM, but I don't see why it wouldn't work in other games. I don't think anyone really plays anymore, but I'll share anyway haha.

    I've only ever seen "prop grab" features that would tie the props position to the players position, I've never liked this as it makes fine-tuning and precision a pain, so I decided to make my own.

    By keybinding "+movexy", and while looking at a prop and holding that keybind, you will be able to maneuver the selected prop around the X and Y axis by moving your mouse around, this is done via TraceRay and Entity Teleporting on a timer that repeats every 0.1 seconds.

    This is my first ever plugin, so it could definitely be better, however it works great for what I wanted it for so I decided to share it. I will however, be trying to make it more efficient and precise for learning reasons.

    NOTES:
    • Try to grab the props at the lowest point nearest to you, it will make the movement a lot cleaner and precise, grabbing higher up can make the movements very un-likeable, due to the TraceRay reading farther past the prop. (Workin' on it).
    • Prop will be frozen when grabbed to prevent it from spazzing out and will remain frozen when released. (it remains frozen after release because this works best as an addon to a build mod that supports unfreezing props)
    • Does not move along the Z axis (Other build mods support this, I use SimpleBuild)
    • No admin rights are required to use, change that in the OnPluginSart() function if wanted.

    Like most plugins, this is implemented simply by dropping the "moveprop_mouse.sp" file in your "scripting" folder, compiling it, and copy/pasting the "moveprop_mouse.smx" file located in the "compiled" folder, into your "plugins" folder. OR, take the .smx and drop it right into your plugins folder if you don't care for the source code

    https://giphy.com/gifs/hTTIf10fRBHx48VH1h/html5 - gif was apparently too large to display here

    Anyway, hope someone finds this useful, and please feel free to share any tips, feedback or ways of increasing precision! it would be much appreciated.
    Attached Files
    File Type: sp Get Plugin or Get Source (moveprop_mouse.sp - 353 views - 3.5 KB)
    File Type: smx moveprop_mouse.smx (7.6 KB, 106 views)

    Last edited by asherkin; 05-15-2020 at 12:34.
    Stugger 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 17:25.


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