Jump to content
Mamba Six

MambaSix Dragging Objects [RELEASE]

Recommended Posts

MambaSix Drag [beta]


I was looking for a slightly more realistic way to drag objects such as fortifications, ammo boxes, and other objects around the battlefield, so I sat down one Saturday afternoon working on a method and this is what it has evolved into. After the copy/paste of a few files, and one simple initialization call, you should be able to drag objects around on the battlefield in a more realistic manner.


MB6_DRAG_IMG_SM.png


Dropbox DL: MB6_Drag_v0.90beta.7z

Current Version: 0.90beta


Usage:


Initialization:
["init"] call MB6_fnc_drag; - Initializes all mission objects.
["initobj",<object>] call MB6_fnc_drag; - Initializes a single object for dragging. This ignores type check in the ignore list.

Framework:
Mission Object: <object> getVariable ["MB6_DRAG_Size"]: "LARGE" or "SMALL" - Determines the size of the object being dragged.
Mission Object: <object> getVariable ["MB6_DRAG_Attached"]: BOOLEAN - True if the object is being dragged, false if not being dragged.
Dragging Unit: <object> getVariable ["MB6_DRAG_Object"]: OBJECT - Object being dragged by the unit, objNull if no object.
MB6\configs\MB6_dragItems.hpp: MB6_ignoreItems - Items that the drag framework will ignore and not be draggable.
MB6\configs\MB6_dragItems.hpp: MB6_bigItmes - Items that will be dragged instead of carried.



Installation Instructions:


1. Copy the MB6 folder directly into your mission folder.
2. Create or open "init.sqf" in the mission root directory.
3. Add the following to the init.sqf:
 

// Include the MB6_DRAG definitions
#include "MB6\configs\MB6_dragItems.hpp"
["init"] call MB6_fnc_drag;

4. Create or open "description.sqf" in the mission root directory.
5. Add the following to the description.sqf:
 

// MambaSix Functions definitions
class CfgFunctions{
    #include "MB6\MB6_cfgFunctions.hpp"
};

6. Copy the stringtable.xml file into your mission root directory, or merge them if you already have created one.



Known Issues:

  • Offsets for objects are often incorrect, as there is currently no detection for the size of the object.
  • There may be some stances and animations where the player gets stuck. I have tried to compensate for them all, but there is a large variety.
  • May be MP compatible. I have tried to write it with such abilities in mind, but I have conducted no testing. Feeback on MP compatibility welcome.



Features Planned (Hopefully):

  • Proper detection of *all* draggables.
  • Better dragging resource display.
  • Integrate an optional object cacheing system
  • Induce some (optional) fatigue when dragging/carrying objects.



Changelog:


Changelog:
v0.90beta
- Script (slightly more) gracefully handles animations for weapons and poses.

v0.84beta
- Actions now display the name of the object being dragged.

v0.83beta
- Fixed: Small objects could not be dragged after dragging large objects.

v0.82beta
- Prevent player from dragging multiple objects.

v0.81beta
- Objects detach when unit is killed.
- Objects are protected from damage when dragging.

v0.8beta:
- Initial revision







Credits:
Cigar0 - Initial concept, which I have since greatly bastardized :P

Share this post


Link to post
Share on other sites

  • Offsets for objects are often incorrect, as there is currently no detection for the size of the object.

 

Have you tried boundingBoxReal?

Share this post


Link to post
Share on other sites

 

  • Offsets for objects are often incorrect, as there is currently no detection for the size of the object.

 

Have you tried boundingBoxReal?

 

Yeah, was working on a solution before real life took hold. The biggest issue I've encountered is that boundingBoxReal is not inherently reliable for how I need to use it. A good example, while not specifically related to this script is looking at the vertical properties of a Hunter's bounding box. 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×