Jump to content
  • 0

Drag Body script


shurix

Question

Hi guys!

 

On more than one occasion I lost my dead body in the textures of a rock while hunting bots. The worst thing that may happen is when you come back looking for your body you are not able to recover any of your awesome gear. You try to open inventory but it closes itself in an instant.

 

So, I had an idea!

 

There is no Drag Body action available in Arma 3 and I don't think they are anywhere near getting that functionality into the platform.

 

I found this script http://forums.bistudio.com/showthread.php?182000-Drag-Dead-Body-Script

on Armaholic but I can't seem to make it work.

 

Has anyone had a chance to get a similar script to work?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

i dont think it wil have the functionallity you desire ... without looking into it i will assume it is using cursortarget to determin if the player is looking at a body.

if this is the case it wont matter if its possible to attach it to yourself when you cant get a target on it in the first place ...

Link to comment
Share on other sites

  • 0

I was able to get this script to the point where I can see the action by adding this into my custom selfActions.sqf:

 

_cursorTarget = cursorTarget;
_typeOfCursorTarget = typeOf _cursorTarget;
_isMan = _cursorTarget isKindOf "Man";
_isAlive = alive _cursorTarget;
hint format [" %1 \n %2 \n %3 \n %4 ",_cursorTarget,_isMan,_isAlive,owner _cursorTarget];
if (_isMan and !_isAlive) then {
if (s_player_dragbody < 0) then {
_cursorTarget setVariable ["H8_increm",1,true];
_cursorTarget setOwner (owner player);
s_player_dragbody = cursorTarget addaction ["Drag Body",{call H8_DragAction},nil,6,false,false,"",""];
};
} else {
_cursorTarget removeAction s_player_dragbody;
s_player_dragbody = -1;
};
 
I come over to the body and "Drag Body" action appears on the mouse wheel. I select it and the script starts working. However, if I move away from the body, it doesn't move. I thought attachTo function needs to refer to a local object. Maybe infiSTAR blocks onEachFrame movements. I don't know and I'm stuck that's why I'm asking if anyone has something similar working.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...