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

Return...

broken avatar :(
Created 12 years ago
by KDXDARK
0 Members and 1 Guest are viewing this topic.
2,994 views
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: ar
Date Registered: 21 August 2011
Last active: 1 day ago
Posts
1,323
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
Personal Quote
This game isn't meant to be played
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Mapper Has released one or more maps to the UGX-Mods community.
KDXDARK's Contact & Social Links
I edit this fuction "auto_turrets". but...

Code Snippet
Plaintext
#include common_scripts\utility;
#include maps\_zombiemode_utility;
#include maps\_utility;
main()
{
// I want back here.
automg = GetEntArray("auto_turrets","targetname");
array_thread(automg,::auto_turrets);
}
auto_turrets()
{
player = undefined; 
self waittill ("trigger",player);
player playsound( "powerup_grabbed" );
level thread activate_mg();
}
activate_mg()
{
player = undefined;
mgs = getentarray( "auto_mg", "targetname" );
for(i=0;i<mgs.size;i++)
{
mg = mgs[i];
mg setTurretTeam( "axis" );
mg SetMode( "auto_nonai" );
mg thread maps\_mgturret::burst_fire_unmanned();
}
wait(10); // Leave turrets on for 30 seconds
for(i=0;i<mgs.size;i++)
{
mg = mgs[i];
mg notify("stop_burst_fire_unmanned");
mg SetMode( "manual" );
}
return; // I add this
}
i want to back to the start of it so i add a return in the end. how i do it?
This topic contains a post which is marked as the Best Answer. Click here to view it.
broken avatar :(
×
broken avatar :(
Location: gbComing up in the world
Date Registered: 26 November 2013
Last active: 11 years ago
Posts
325
Respect
Forum Rank
Perk Hacker
Primary Group
Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
I own the hat!
×
DuaLVII's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
DuaLVII's Contact & Social LinksDuaLVIIthomas.gascoigne.7DuaLVIITheProlonger
Code Snippet
Plaintext
auto_turrets()
{
while(1)
{
player = undefined; 
self waittill ("trigger",player);
player playsound( "powerup_grabbed" );
level thread activate_mg();
}
}

Or

Code Snippet
Plaintext
auto_turrets()
{
for(;;)
{
player = undefined; 
self waittill ("trigger",player);
player playsound( "powerup_grabbed" );
level thread activate_mg();
}
}

Whichever tickles your fancy.
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: ar
Date Registered: 21 August 2011
Last active: 1 day ago
Posts
1,323
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
Personal Quote
This game isn't meant to be played
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Mapper Has released one or more maps to the UGX-Mods community.
KDXDARK's Contact & Social Links
Code Snippet
Plaintext
auto_turrets()
{
while(1)
{
player = undefined; 
self waittill ("trigger",player);
player playsound( "powerup_grabbed" );
level thread activate_mg();
}
}

Or

Code Snippet
Plaintext
auto_turrets()
{
for(;;)
{
player = undefined; 
self waittill ("trigger",player);
player playsound( "powerup_grabbed" );
level thread activate_mg();
}
}

Whichever tickles your fancy.
it dont work. :( it just work one time only
Marked as best answer by KDXDARK 12 years ago
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 30 July 2013
Last active: 2 years ago
Posts
517
Respect
Forum Rank
Zombie Enslaver
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Ege115's Groups
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Ege115's Contact & Social LinksEge115
Are you sure you are doing it like this?
Code Snippet
Plaintext
#include common_scripts\utility;
#include maps\_zombiemode_utility;
#include maps\_utility;
main()
{
// I want back here.
automg = GetEntArray("auto_turrets","targetname");
array_thread(automg,::auto_turrets);
}
auto_turrets()
{
        while(1)
        {
player = undefined; 
self waittill ("trigger",player);
player playsound( "powerup_grabbed" );
level thread activate_mg();
        wait 10;
        }
}
activate_mg()
{
player = undefined;
mgs = getentarray( "auto_mg", "targetname" );
for(i=0;i<mgs.size;i++)
{
mg = mgs[i];
mg setTurretTeam( "axis" );
mg SetMode( "auto_nonai" );
mg thread maps\_mgturret::burst_fire_unmanned();
}
wait(10); // Leave turrets on for 30 seconds
for(i=0;i<mgs.size;i++)
{
mg = mgs[i];
mg notify("stop_burst_fire_unmanned");
mg SetMode( "manual" );
}
//return; // I add this
}
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: ar
Date Registered: 21 August 2011
Last active: 1 day ago
Posts
1,323
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
Personal Quote
This game isn't meant to be played
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Mapper Has released one or more maps to the UGX-Mods community.
KDXDARK's Contact & Social Links
Are you sure you are doing it like this?
Code Snippet
Plaintext
#include common_scripts\utility;
#include maps\_zombiemode_utility;
#include maps\_utility;
main()
{
// I want back here.
automg = GetEntArray("auto_turrets","targetname");
array_thread(automg,::auto_turrets);
}
auto_turrets()
{
        while(1)
        {
player = undefined; 
self waittill ("trigger",player);
player playsound( "powerup_grabbed" );
level thread activate_mg();
        wait 10;
        }
}
activate_mg()
{
player = undefined;
mgs = getentarray( "auto_mg", "targetname" );
for(i=0;i<mgs.size;i++)
{
mg = mgs[i];
mg setTurretTeam( "axis" );
mg SetMode( "auto_nonai" );
mg thread maps\_mgturret::burst_fire_unmanned();
}
wait(10); // Leave turrets on for 30 seconds
for(i=0;i<mgs.size;i++)
{
mg = mgs[i];
mg notify("stop_burst_fire_unmanned");
mg SetMode( "manual" );
}
//return; // I add this
}

it works thanks :D +1

also thanks to DuaLVII +1

 
Loading ...