Advertisement
Guest User

tour2

a guest
Nov 27th, 2014
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.94 KB | None | 0 0
  1. private["_object","_player","_id","_marker"];//tour2
  2. //On prend les arguments
  3. _myaction2 = _this select 0;
  4. _player = _this select 1;  // pour l'action
  5. _id =_this select 2;
  6. _marker = _this select 3;  //non de la tour
  7.  
  8. {
  9.    if ( side _x == independant ) then
  10.    {
  11.       _nbDepanneur = _nbDepanneur + 1;
  12.    };
  13. } forEach playableUnits;
  14.  
  15. if ( _nbDepanneur > 0) then{
  16.     _player playMove "DismountOptic";   //On lance la petite séquence d'animation:
  17.     sleep 3.0;
  18.     waitUntil {animationState _player != "DismountOptic"};
  19.     _player playMove "DismountOptic";
  20.     sleep 3.0;
  21.     /*
  22.         waitUntil {animationState _player != "DismountOptic"};
  23.         _player playMove "DismountOptic";
  24.         sleep 3.0;
  25.         waitUntil {animationState _player != "DismountOptic"};
  26.         _player playMove "DismountOptic";
  27.         sleep 3.0;
  28.         waitUntil {animationState _player != "DismountOptic"};
  29.         _player playMove "DismountOptic";
  30.         sleep 3.0;
  31.         waitUntil {animationState _player != "DismountOptic"};
  32.         _player playMove "DismountOptic";
  33.         sleep 3.0;
  34.         waitUntil {animationState _player != "DismountOptic"};
  35.         _player playMove "DismountOptic";
  36.         sleep 3.0;
  37.         waitUntil {animationState _player != "DismountOptic"};
  38.         _player playMove "DismountOptic";
  39.         sleep 3.0;
  40.     */
  41.     waitUntil {animationState _player != "DismountOptic"};
  42.     _player playMove "DismountOptic";
  43.     sleep 3.0;
  44.     waitUntil {animationState _player != "DismountOptic"};
  45.    
  46.     _marker setMarkerColor "colorgreen";                            //modification du statu:
  47.  
  48.     hint format["la tour de comumication %1 et réparer",_marker];  //Petit message pour tous:
  49.  
  50.     //Ici placer scripts pour éteindre les communication:
  51.     _myaction2 removeAction _id;                                   //supresion de l'action
  52.     _myaction = transfo addAction ["<t color='#960018'>couper les communication</t>", "tour1.sqf", "1", 0, true, true, "", ""];
  53. }
  54. else{
  55.     hint format ["il y a pas de dépanneur donc tu peus réparer la tour %1 si tu a un toulkit",_marker];
  56. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement