Jump to content
Sign in to follow this  
TangVector

stopping Vehicle repair Animation

Recommended Posts

Hi, I am very new to scripting and I am using this command to have an AI, Alpha1, start the scenario repairing a vehicle as an animation and it works:

[Alpha1, "REPAIR_VEH_STAND", "FULL"] call BIS_fnc_ambientAnim; 

 

But then I want Alpha1 to stop repairing and move to a waypoint once an Independent AI enters the TRIGGER zone. I have another AI, Alpha2, that is standing and then successfully moves to waypoint once TRIGGERED by an Independent AI. I can not figure out how to make Alpha1 stop repairing. I have tried:

[Alpha1, "REPAIR_VEH_STAND", "FULL"] call BIS_fnc_ambientAnim; Alpha1 disableAI "MOVE";      

on TRIGGER: 

hint "ACTIVE"; Alpha2 enableAI "MOVE"; Alpha1 enableAI "MOVE";

and I have tried:

[Alpha1, "REPAIR_VEH_STAND", "FULL"] call BIS_fnc_ambientAnim; Alpha1 enableAI "MOVE";

on TRIGGER: 

hint "ACTIVE"; Alpha2 enableAI "MOVE"; Alpha1 disableAI "REPAIR_VEH_STAND";

 

I would like some help in making Alpha1 stop repairing animation , OR......Can I have a reason why Alpha1 will not stop Animation? Is it because the animation does not allow itself to be TRIGGERED?  Thank you for your answers!

 

 

Share this post


Link to post
Share on other sites
56 minutes ago, beno_83au said:

https://community.bistudio.com/wiki/BIS_fnc_ambientAnim

First step if something isn't working should be to check the wiki for the commands or functions you're using. You'll also find that "REPAIR_VEH_STAND" part of the suite of accepted strings that can be used with the enable/disableAI commands.

Hey thanks, bud!

This command does not work for me, I'm not sure why not:
call BIS_fnc_ambientAnimCombat

It just avoids any kind of animation and goes straight to combat mode, but what did work for me was at the TRIGGER:
unitName call BIS_fnc_ambientAnim__terminate;

The AI unit stopped it's repair animation and proceeded to it's waypoint.

Share this post


Link to post
Share on other sites
2 hours ago, TangVector said:

This command does not work for me, I'm not sure why not:
call BIS_fnc_ambientAnimCombat

 

What's your code for calling it?

Share this post


Link to post
Share on other sites

@TangVector,
You can stop the animation loop with a condition (like trigger activated),

[_unit, "STAND", "FULL", { triggerActivated trg1 }] call BIS_fnc_ambientAnimCombat;

Also,

Quote

Animations can be cancelled using 


_unit call BIS_fnc_ambientAnim__terminate

 


And @pierremgi,
example 1) on bis_fnc_ambientAnim 

Have fun!

  • Like 1

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  

×