Jump to content
Sign in to follow this  
jandrews

animation question

Recommended Posts

I want to have the trigger go with west player within 3 m, does this look correct?

would this work in trigger

none, none,

condition: if (side player == west) + (player distance triggername) < 3 then;

Act: {H1 enableAI _x} forEach ["ANIM","AUTOTARGET","FSM","MOVE","TARGET"]; detach H1; H1 switchMove ""; H1 setCaptive false; H1 joinSilent player;

Edited by JAndrews1

Share this post


Link to post
Share on other sites

You wouldnt us the if then command in a trigger.

In the condition field:

(side player == west) && player distance triggername < 3

On act field:

{H1 enableAI _x} forEach ["ANIM","AUTOTARGET","FSM","MOVE","TARGET"]; detach H1; H1 switchMove ""; H1 setCaptive false; H1 joinSilent player;

Share this post


Link to post
Share on other sites

thanks cobra. let you know if it works.

Share this post


Link to post
Share on other sites

trigger = t1, radius 0/0/0, none, none,

condition field:

(side player == west) && player distance t1 < 3

On act field:

{H1 enableAI _x} forEach ["ANIM","AUTOTARGET","FSM","MOVE","TARGET"]; detach H1; H1 switchMove ""; H1 setCaptive false; H1 joinSilent player;

They release but do not join my guy for me to give them directions. ideas?

Share this post


Link to post
Share on other sites

hey cobra, the brackets work, however the unit goes into a sitting posture again after he joins, must be some bug. I have it the same as above in trigger and once hes released he stands and then sits, I give an order and he stands and then sits.

unit init = removeAllAssignedItems this; removeAllWeapons this; removeVest this; removeUniform this; this setCaptive true; [this, "SIT_LOW_U", "NONE" ] call BIS_fnc_ambientAnim

trigger = t1, radius 0/0/0, none, none,

condition field:

(side player == west) && player distance t1 < 3

On act field:

{H1 enableAI _x} forEach ["ANIM","AUTOTARGET","FSM","MOVE","TARGET"]; detach H1; H1 switchMove ""; H1 setCaptive false; H1 joinSilent player;

Share this post


Link to post
Share on other sites

Looks like a bug to me. This works.

hostage.sqf

_unit = _this select 0;

removeAllAssignedItems _unit; 
removeGoggles _unit; 
removeHeadgear _unit; 
removeAllContainers _unit;
removeAllWeapons _unit; 

_unit setCaptive true;
_unit switchMove "aidlpsitmstpsnonwnondnon_ground00";
{_unit disableAI _x} forEach ["ANIM","MOVE","TARGET","FSM","AUTOTARGET"];

Also rather than doing a distance check from the trigger why not do it from the hostage.

condition:

player distance H1 < 3

on Act:

{H1 enableAI _x} forEach ["ANIM","AUTOTARGET","FSM","MOVE","TARGET"]; 
detach H1; 
H1 switchMove ""; 
H1 setCaptive false;
[H1] joinSilent player;

---------- Post added at 13:26 ---------- Previous post was at 12:55 ----------

Okay so I played with this some more, for some reason now the function is not terminating like it used to, maybe its from the latest patch. In order to stop using Bis_fnc_ambientanim you should use this:

unitname call BIS_fnc_ambientAnim__terminate;

That will make the function terminate. So this is what it should look like.

Your hostages init line:

removeAllAssignedItems this;   
removeUniform this; 
this setCaptive true; 
[this, "SIT_LOW_U", "NONE" ] call BIS_fnc_ambientAnim;

Your trigger:

Cond:

player distance H1 < 3

Act:

H1 call BIS_fnc_ambientAnim__terminate; 
H1 switchMove "amovpsitmstpsnonwnondnon_amovpercmstpsnonwnondnon_ground"; //this will make the unit actually stand up rather than pop up
H1 setCaptive false; 
[H1] joinSilent player;

Edited by cobra4v320

Share this post


Link to post
Share on other sites

great, appreciate your help. I have some other questions may be you can help me with those. I will post them back here.

---------- Post added at 15:32 ---------- Previous post was at 15:26 ----------

http://forums.bistudio.com/showthread.php?174190-looking-for-a-working-JIP-script-or-some-way-to-help-JIPs-Any-takers

---------- Post added at 15:33 ---------- Previous post was at 15:32 ----------

http://forums.bistudio.com/showthread.php?174179-trigger-scripting-questions

---------- Post added at 15:34 ---------- Previous post was at 15:33 ----------

I am sure your very busy. So if so thanks.

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
Sign in to follow this  

×