UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

bo1 sentry turrets

broken avatar :(
Created 10 years ago
by Wolf_Silver
0 Members and 1 Guest are viewing this topic.
1,405 views
broken avatar :(
×
broken avatar :(
Location: frPontault-Combault, France
Date Registered: 18 October 2014
Last active: 4 days ago
Posts
86
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
Signature
Visitez mon site : http://www.fr-mapping.net/index.php pour rejoindre la communauté Française sur le mod tools!
visit my website : http://www.fr-mapping.net/index.php to join french communauty on mod tools
×
Wolf_Silver's Groups
Hello all! i have ported weaponfiles and model for auto turrets from bo1 all works but i want make an AUTO turret not manual so i have follow tutorial of ugx wiki to add turrets here script:
Code Snippet
Plaintext
#include common_scripts\utility;
#include maps\_zombiemode_utility;
#include maps\_utility;
    main()
    {
iprintlnbold("tourelles init");
    level thread manage_mg();
    }
    manage_mg()
    {
   while(1)
   {
   // SET COST HERE
   cost = 1000;
   player = undefined;
   trigs = getentarray( "activate_mg", "targetname");
   for(i = 0; i < trigs.size; i++)
   {
   trig = trigs[i];
   trig setcursorhint("HINT_NOICON");
   trig usetriggerrequirelookat();
   trig sethintstring("Maintenez &&1 pour activer la tourelle [ cout: 1000]");
   trig waittill("trigger", player);
   if(!is_player_valid(player))
        {
           continue;
        }
   if(player.score >= cost)
        {
           level thread activate_mg();
           player playsound("cha_ching");
           player maps\_zombiemode_score::minus_to_player_score( cost );
           trig sethintstring("^3Tourelles Automatique ^2Activee!");
           wait(60); // Wait 30 seconds and then turn them off
           trig sethintstring("Tourelle non disponible!");
           wait(120); // Cool-down for 120 seconds
           trig sethintstring("Maintenez &&1 pour activer la tourelle [ cout: 1000]");
        }
        else
        {
           player playsound("no_cha_ching");
        }
     }
     wait(0.05);
     }
  }
        activate_mg()
     {
  mgs = getentarray( "auto_mg", "targetname" );
         for(i=0;i<mgs.size;i++)
  {
     mg = mgs[i];
     mg setTurretTeam( "allies" );
     mg SetMode( "auto_nonai" );
     mg thread maps\_mgturret::burst_fire_unmanned();
  }
  wait(60); // Leave turrets on for 60 seconds
  for(i=0;i<mgs.size;i++)
  {
     mg = mgs[i];
     mg notify("stop_burst_fire_unmanned");
     mg SetMode( "manual" );
  }
   }
 

(include also _mg_turrets.gsc)

But when i buy turret it doesn't fire at all....  radiant is good so i don't know why sentry turrets doesn't work...

and also as you can see i am a perfect englsih guy (or not) no my english is horrible :) lol

thanks for help!
Last Edit: October 31, 2015, 08:09:09 pm by Wolf_Silver

 
Loading ...