Forum Jump :

Author Message


Posts: 3
Rank:


Level: Member

Country: fr
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2016-08-08 14:09        
     
Hello,

I would like that the swivel target don't move until i have activated a trigger.

Or if it's possible to know how to find the animations names of an animated object that's would be awesome.

Someone can help me please ?

Thanks.


Author Message


Posts: 1589
Rank:


Level: Member

Country: pf
Location: Tahiti
Occupation: too many Arma
Age: 58
In-game name: Kobayashi Maru

 
#2 Posted at 2016-08-08 22:04        
     
Not really easy!

Name your target, example tgt1
in init field of the target:
["freezeTgt","onEachFrame", {tgt1 animate ["Swivel_6rpm_rot",0.5]}] call Bis_fnc_addStackedEventHandler;
in your trigger (activation as you want), make it repeatable, and:
on activation field:
["freezeTgt","onEachFrame"] call Bis_fnc_removeStackedEventHandler;
on deactivation field:
["freezeTgt","onEachFrame", {tgt1 animate ["Swivel_6rpm_rot",0.5]}] call Bis_fnc_addStackedEventHandler;

Explanation:
Without any BI documentation, you have to use the animate command (animateSource doesn't work). You have to counter the macro embedded with the object's configClass. Do it on each frame or inside a while {true} loop; sleep sometime

For a swilvel target, there are 9 different speeds! But at this time, I don't know how do they work.
You can find the name of these animations:
write in debug console (in one of the watch line: animationNames tgt1. You can see all possible rpm.

To find the one I had to counter, I wrote in the debug console:
0 = [] spawn {
  while {true} do {
   _an = [];
   {_an pushBack (tgt1 animationPhase _x)} forEach animationNames tgt1;
   hintSilent format  ["%1", _an];
   sleep 1
  }
}
This way, you can see which animation is active: here "Swivel_6rpm_rot".

PLEASE CONTACT ME ON BI FORUMS FOR ANY SCRIPT / MOD QUESTION. TKS

Advertisement


Author Message


Posts: 3
Rank:


Level: Member

Country: fr
Location:
Occupation:
Age:
In-game name:

 
#3 Posted at 2016-08-11 11:39        
     
Thanks for your answer Pierre MGI, I will try this later !
I have used the simple target for the moment and it's working fine, but thanks for your explanations.