Kladho 10 Posted March 10, 2010 How to drag a unit from the beginning of the mission? Like this: And if you now that how to carry a unit from the begin of the mission? :404: Share this post Link to post Share on other sites
snkman 351 Posted March 10, 2010 This only works by using the B.I.S. modules. Check this: Battlefield Clearance Share this post Link to post Share on other sites
Kladho 10 Posted March 10, 2010 it must be posible bye scripting Share this post Link to post Share on other sites
manzilla 1 Posted August 11, 2010 How can I script this for a scene: At the end of a campaign mission I'm making my team get wounded and must be dragged away by the AI Takis in the closing scene. I understand I'm supposed to use animations but I have no clue how to do it. Simply make AI unit A drag a wounded AI/player unit B. I have 5 team members so preferably 4 units getting dragged will be AI and the fifth, team leader, will be the player. I want the AI Takis to be dragging them away as the scene(outro) fades away. Any suggestions? I've tried the search but people use retarded thread names that make it impossible to find anything anymore. Share this post Link to post Share on other sites
rick rawlings 2 Posted August 11, 2010 How can I script this for a scene: At the end of a campaign mission I'm making my team get wounded and must be dragged away by the AI Takis in the closing scene. I understand I'm supposed to use animations but I have no clue how to do it. Simply make AI unit A drag a wounded AI/player unit B. I have 5 team members so preferably 4 units getting dragged will be AI and the fifth, team leader, will be the player. I want the AI Takis to be dragging them away as the scene(outro) fades away. Any suggestions? I've tried the search but people use retarded thread names that make it impossible to find anything anymore. If you use the animation viewer: http://www.armaholic.com/page.php?id=10941 you can identify the dragger and dragee animations. You will probably need to attachTo the two units and play the animations. That is my best guess! Hope it helps! RR Share this post Link to post Share on other sites
manzilla 1 Posted August 12, 2010 If you use the animation viewer: http://www.armaholic.com/page.php?id=10941 you can identify the dragger and dragee animations. You will probably need to attachTo the two units and play the animations. That is my best guess! Hope it helps! RR Yeah I know about all that but I wouldn't know where to start. I was hoping someone had done it before and could provide an example. I've been trying for weeks to get it done to no avail. Thanks for the help though. It's always appreciated. Share this post Link to post Share on other sites
Jack_Ryan_ 10 Posted August 12, 2010 Check out Norrin's Revive script. He has drag in there. Share this post Link to post Share on other sites
manzilla 1 Posted August 12, 2010 (edited) Way too complicated for my knowledge. I tried looking there. I just need to know what the attachto command that is used looks like and how to set up the animations. It's just a simple scripted scene. Really guys, I know where to look. I just don't know what to look at and how to implement it. If you can't help directly there's really no need to tell me to look places, unless there's a scene in a mission someone can point me to. I've pretty much tried everything. Thanks for the help though. I do appreciate it. How about this, does anyone know who took that screen shot posted above? If it's a BIS made picture, any idea who did it? I'll PM that person. Hell I'll ask the author of any mission where someone has seen a screen shot or scene with an AI unit dragging/carrying another unit. I can probable remake it from such a mission but I can't find or remember one that has such a scene. Edited August 12, 2010 by Manzilla Share this post Link to post Share on other sites
kylania 568 Posted August 12, 2010 That's was a promo in-game screenshot from BIS from before ArmA2 came out. Share this post Link to post Share on other sites
AZCoder 921 Posted August 12, 2010 Norrins revive does have a carry.sqf and drag.sqf in the revive sqf folder. I saw attachto in there and animations. I'm at work so I can't offer more at the moment, and I haven't tried it, but looks very promising. Share this post Link to post Share on other sites
manzilla 1 Posted August 12, 2010 Yup, I've been looking at it but can't figure it out exactly. Thanks for the reply. Share this post Link to post Share on other sites
Clayman 20 Posted August 12, 2010 This is what I got so far: _dragger switchMove "AcinPknlMwlkSnonWnonDb"; _injured switchMove "AinjPpneMstpSnonWrflDb"; _injured attachTo [_dragger, [0, 1.2, 0]]; _injured setDir 180; It's not perfect, the units sometimes won't move. But it might be a start. Share this post Link to post Share on other sites
manzilla 1 Posted August 12, 2010 (edited) Thanks Clayman! I got the attachto working and the anim + movement for the dragger but the injured anim does not work. I have this in the units init line: this switchMove "AinjPpneMstpSnonWrflDb"; this playMove "AinjPpneMstpSnonWrflDb"; this attachto [H1,[0.1, 1.01, 0]]; this disableAI "ANIM"; It's a BLUFOR unit that's getting dragger by a Takis civie but the BLUFOR units just stands there while being dragged. Any suggestions? I'd prefer to figure out how to do it via the init line of the two units for now. EDIT: Hmmmm... it seems to work if I add a wp for the unit and place that in the wp's init. I guess the script version is the way to go. ;) Edited August 12, 2010 by Manzilla Share this post Link to post Share on other sites
Clayman 20 Posted August 12, 2010 Most animations don't work in the init line. Either use a waypoint, trigger or script. ;) Share this post Link to post Share on other sites
manzilla 1 Posted August 12, 2010 Thank you sir! I may have some more questions soon. I appreciate the help. Share this post Link to post Share on other sites
JDog 11 Posted August 13, 2010 I realize I might be getting to this thread late.. I got this managed last year: I still have the mission file but its on another disk. I'll see if I can pull it and post the script tomorrow. However I should mention that's specifically for dragging/carrying and AI by the player, by setting him unconscious and making it not possible to heal him. Share this post Link to post Share on other sites
JDog 11 Posted August 13, 2010 K its massive for a post probably but here it is, where 'sarPilot' is the unit name of the AI who gets put unconscious and the player carries out. sarPilot setCaptive true; sarPilot disableAI "ANIM"; sarPilot setHit ["body",0.7]; sarPilot setHit ["legs",0.9]; sarPilot setHit ["arms",0.6]; sarPilot setHit ["head_hit",0.3]; sarPilot setVariable ["BIS_noCoreConversations", true, true]; injuredAnim = sarPilot spawn { _this switchMove "AinjPpneMstpSnonWnonDnon"; // waitUntil{!medicTreatingCaptive}; _this setVariable ["BIS_IS_inAgony",true]; _this setVariable ["BIS_IS_agonyDam",0,true]; waitUntil{ if(_this getVariable "BIS_IS_inAgony")then{_this setVariable ["BIS_IS_inAgony",true]}; !(alive _this) }; _this setVariable ["BIS_IS_inAgony",false,true]; }; captiveShowSignsOfLife = sarPilot spawn { _gestures = ["GestureSpasm0Weak","GestureSpasm1Weak","GestureSpasm2Weak","GestureSpasm3Weak","GestureSpasm4Weak","GestureSpasm6Weak"]; _timer = 0; waitUntil{ if(animationState _this != "AinjPpneMstpSnonWnonDnon")then{ _this playActionNow "GestureNod"; waitUntil{!(alive _this) || (animationState _this == "AinjPpneMstpSnonWnonDnon") || (animationState _this == "AinjPfalMstpSnonWnonDnon_carried_down")}; if(animationState _this == "AinjPfalMstpSnonWnonDnon_carried_down")then{ _this playMoveNow "AinjPpneMstpSnonWnonDnon"; waitUntil{animationState _this == "AinjPpneMstpSnonWnonDnon"} }; _timer = 0 }; if(_timer <= 0 && alive _this)then{ _gesture = _gestures select (floor random 6); _this playAction _gesture; _timer = 120 }; sleep 0.5; _timer = _timer - 0.5; !(alive _this) }; _this playActionNow "GestureNod"; _this setHit ["head_hit",1]; }; This just make him unconscious, stops him from talking, makes the player unable to heal him, and allows you to drag/carry. Share this post Link to post Share on other sites
Pte Frank -3para- 10 Posted August 30, 2010 K its massive for a post probably but here it is, where 'sarPilot' is the unit name of the AI who gets put unconscious and the player carries out,This just make him unconscious, stops him from talking, makes the player unable to heal him, and allows you to drag/carry. hey i am working on a arrest script.... i can get to the point were my detained person is on the floor face down but i now want to drage them (maybe have them standing hands behind back attached to a player who has hands holding them or something like they are holding their cuffs. then i need them to be able to load them in to the cargo of a vehicel and pull them out. and a function to put them down....any help? Share this post Link to post Share on other sites
Pte Frank -3para- 10 Posted September 3, 2010 K its massive for a post probably but here it is, where 'sarPilot' is the unit name of the AI who gets put unconscious and the player carries out. sarPilot setCaptive true; sarPilot disableAI "ANIM"; sarPilot setHit ["body",0.7]; sarPilot setHit ["legs",0.9]; sarPilot setHit ["arms",0.6]; sarPilot setHit ["head_hit",0.3]; sarPilot setVariable ["BIS_noCoreConversations", true, true]; injuredAnim = sarPilot spawn { _this switchMove "AinjPpneMstpSnonWnonDnon"; // waitUntil{!medicTreatingCaptive}; _this setVariable ["BIS_IS_inAgony",true]; _this setVariable ["BIS_IS_agonyDam",0,true]; waitUntil{ if(_this getVariable "BIS_IS_inAgony")then{_this setVariable ["BIS_IS_inAgony",true]}; !(alive _this) }; _this setVariable ["BIS_IS_inAgony",false,true]; }; captiveShowSignsOfLife = sarPilot spawn { _gestures = ["GestureSpasm0Weak","GestureSpasm1Weak","GestureSpasm2Weak","GestureSpasm3Weak","GestureSpasm4Weak","GestureSpasm6Weak"]; _timer = 0; waitUntil{ if(animationState _this != "AinjPpneMstpSnonWnonDnon")then{ _this playActionNow "GestureNod"; waitUntil{!(alive _this) || (animationState _this == "AinjPpneMstpSnonWnonDnon") || (animationState _this == "AinjPfalMstpSnonWnonDnon_carried_down")}; if(animationState _this == "AinjPfalMstpSnonWnonDnon_carried_down")then{ _this playMoveNow "AinjPpneMstpSnonWnonDnon"; waitUntil{animationState _this == "AinjPpneMstpSnonWnonDnon"} }; _timer = 0 }; if(_timer <= 0 && alive _this)then{ _gesture = _gestures select (floor random 6); _this playAction _gesture; _timer = 120 }; sleep 0.5; _timer = _timer - 0.5; !(alive _this) }; _this playActionNow "GestureNod"; _this setHit ["head_hit",1]; }; This just make him unconscious, stops him from talking, makes the player unable to heal him, and allows you to drag/carry. hey im trying to get a guy to drag a conciouse unit..."he has been arrested and in the sqf before this is lying down faceing th floor with hands behind back and an action to drag...can u spot a mistake? _suspect = _this select 0; _unit = player; _suspect setCaptive true; _suspect disableAI "ANIM"; _suspect setVariable ["BIS_noCoreConversations", true, true]; _suspect switchMove "CivilSitting"; _unit playaction "AcinPknlMstpSrasWrflDnon" _suspect attachto [_unit,[1, 1, 0]] _suspect setDir 180; _action = _suspect addAction["foo", "foo.sqf"]; while {_action >= 0} do { _suspect removeAction _action; _action = _action - 1; }; _unit addAction ["Drop body", "arrest_sqf\drop.sqf"]; if (true) exitWith {}; Share this post Link to post Share on other sites
callihn 10 Posted September 3, 2010 This only works by using the B.I.S. modules.Check this: Battlefield Clearance Then I suppose you could use setDamage on the player you want to drag. http://community.bistudio.com/wiki/setDamage ? Share this post Link to post Share on other sites
00dc15 0 Posted September 3, 2010 I think the way forward would be to firstly link the wounded soldier & the soldier dragging him to the First Aid modules then use a (possibly) yet to be discovered action command for the AI to drag or carry him (if there is such a command). The magic number to have a First Aid Linked Person rolling round on the floor is "this setdammage 0.89", as discovered by someone on the forums (sorry can't remember who). Regards James Share this post Link to post Share on other sites
Pte Frank -3para- 10 Posted September 4, 2010 Then I suppose you could use setDamage on the player you want to drag.http://community.bistudio.com/wiki/setDamage ? supose but im useing the accachto command so i dont see why they would need to be damaged? im not makeing then unconciouse at all :/.... unless an unconciouse player becomes an object lmao. this really sucks ---------- Post added at 11:14 AM ---------- Previous post was at 11:12 AM ---------- I think the way forward would be to firstly link the wounded soldier & the soldier dragging him to the First Aid modules then use a (possibly) yet to be discovered action command for the AI to drag or carry him (if there is such a command). The magic number to have a First Aid Linked Person rolling round on the floor is "this setdammage 0.89", as discovered by someone on the forums (sorry can't remember who). Regards James is that for me? im not trying to carry an hurt ai im trying to drag one on full life but i havee arrested them. Share this post Link to post Share on other sites