OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: danturn on 16 May 2008, 03:34:49

Title: Arresting idea
Post by: danturn on 16 May 2008, 03:34:49
Is there an  animation in ArmA that you can activate which causes the person to raise his hands behind his head, or go prone or to his knees with hands behind his head?

I found this page somewhere on the forum whilst searching for it and was wondering if the scripts would work for ArmA? Unfortunatly the script is in german so i can't make any sense of it to edit or work it out myself.

http://www.ofpec.com/forum/index.php?topic=15776.msg125433#msg125433 (http://www.ofpec.com/forum/index.php?topic=15776.msg125433#msg125433)

My idea was to 'frisk' a person and if a certain magazine or weapon was found on them it would create an addaction to arrest at which point the person would perform the animation, the magazine would be removed (along with any weapons), and go into the players (or group member or vehicles) inventory and the person would join the group as a captive.

Thanks for any help (and apologies for being so inquisitive lately :P)

Oh one last thing. I have mention this in a previous post with no answer, but in OFP the mission you were creating had a specific folder in which to add any scripts, to my eyes, this does not appear so with ArmA so where do i place scripts or mission info etc?
Title: Re: Arresting idea
Post by: schuler on 16 May 2008, 05:06:24
hi being inquisitive are we? thats good!
you might be able to modify this script, i says the enemy group surrenders after so many are dead.
edit you could link the civys with a enemy soilder and make the presence set to 0 in his unit, that makes them ememys too and you cant see the soilder
i remember a mission where if you walk up to a civ and he was the enemy you had the addaction to take him..



http://www.ofpec.com/ed_depot/index.php?action=details&id=531&page=0&cat=xyz
Title: Re: Arresting idea
Post by: Cheetah on 16 May 2008, 08:37:56
I think that there was a 'hands behind head' animation in OFP, not sure if there is one in ArmA. Have you looked at the bis community wiki pages for the switchmove/playmove list?
Title: Re: Arresting idea
Post by: Binary on 16 May 2008, 09:55:23
You can use this animation viewer by Kronzky to view all the animations that are in ArmA.
http://kronzky.info/animationviewer/index.htm

And yes, there is an animation with hands behind his head - both standing and kneeling i believe.

Try it out and let us know how it goes - often toyed with the idea, but never really got around to implement it correctly  :)
Title: Re: Arresting idea
Post by: Gielovic on 16 May 2008, 15:42:57
i guess this is the one which keeps a unit in good position:


"AmovPercMstpSsurWnonDnon"

use: _target playmove "AmovPercMstpSsurWnonDnon";
Title: Re: Arresting idea
Post by: danturn on 19 May 2008, 04:20:38
would target be the person's name who is to do the action?
Title: Re: Arresting idea
Post by: schuler on 19 May 2008, 04:24:09
yes larry playmove "AmovPercMstpSsurWnonDnon";
Title: Re: Arresting idea
Post by: danturn on 19 May 2008, 05:07:39
I have started trying to create this script but im having a few problems.

To put you in perspective, to test i have two units,

The player named "player"
The civilian i am trying to arrest named "a" (in the init field i have, this addaction "[arrest", "arrest.sqs"])

Now for the script

Code: [Select]
_a playmove "AmovPercMstpSsurWnonDnon";
_a setcaptive true;
_removeallweapons a;

When using the addaction i get the error message

'_removeallweapons |#| a;'
Error missing ;

Why am i getting this??

Also, the unit isn't doing the animation which i know works as i've tested it using a trigger.
Title: Re: Arresting idea
Post by: Planck on 19 May 2008, 11:31:07
Who is _a?

Is this unit defined somewhere else?

I know you have a unit called a, but who is _a?


Why does removeAllWeapons have an underscore tagged on the start? .. remove it.


Planck
Title: Re: Arresting idea
Post by: danturn on 19 May 2008, 13:16:54
Hmm, i read somewhere theat when writing scripts they had to start with and underscore, thats why everything starts with an underscore.

I'm not sure what you mean who is 'a', 'a' is just the name of a unit as you ned to have names so the script knows what to do the action too.
Title: Re: Arresting idea
Post by: danturn on 19 May 2008, 17:28:22
Have the script working now, turns out you don't need the underscore  :dunno:

thanks for everyones help

one last thing to make this a bit better, i understand that if i want it to play a sound i use

Code: [Select]
unit1 say "filenamehere"
this means id have to have someone act the part which i may do at a later date, but for now, how do i just make it as a radio message where the words just come up on screen?
Title: Re: Arresting idea
Post by: Gielovic on 20 May 2008, 21:58:15
would target be the person's name who is to do the action?

No target unit should be the person who is to be captured as then the action appears only when you are near to that unit .

See the second example over here (http://community.bistudio.com/wiki/addAction)
Title: Re: Arresting idea
Post by: h- on 21 May 2008, 08:26:46
danturn, please don't post consecutively.
If you have something to add after a short period of time modify your post instead of 'replying to yourself'.