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

TeddY!!!!

broken avatar :(
Created 12 years ago
by pashan
0 Members and 1 Guest are viewing this topic.
3,354 views
broken avatar :(
×
broken avatar :(
UM Member, Mapper and 3d Modeler
Location: ca
Date Registered: 8 February 2014
Last active: 5 years ago
Posts
835
Respect
Forum Rank
The Decider
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Port Arthur
Signature
×
pashan's Groups
Mapper Has released one or more maps to the UGX-Mods community.
How do i make it so that when the player hits 3 teddys (There will be a trigger around the obviously)

it gives all the players in the game a perk (if they have all the perks it gives them 3000 points)
This topic contains a post which is marked as the Best Answer. Click here to view it.
broken avatar :(
×
broken avatar :(
Location: usYork, SC
Date Registered: 15 March 2014
Last active: 7 years ago
Posts
214
Respect
Forum Rank
Mr. Elemental
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
WaW Scriptor
Signature
WaW Scriptor
×
PROxFTW's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
PROxFTW's Contact & Social LinksPROxFTWPROxFTWPROxFTWPROxFTW
Here this should be what you are looking for. Made this pretty quick so maybe some bugs. This works for the original 4, if you would like me to make it work for more let me know.
Code Snippet
Plaintext
TeddyTrig()
{
level.TeddyCount = 0;
Trig = GetEntArray( "ENT", "targetname" );
for( i = 0; i < Trig.size; i++ )
Trig[i] thread Trigger();
for(;;)
{
if( level.TeddyCount == 3 )
{
if( self HasAllPerks() )
self.score += 3000; // Dont remember the code in zombiemode_score atm.
else
Play[i] thread GiveRandPerk();
}
wait .05;
}
}

HasAllPerks()
{
if( self HasPerk( "specialty_armorvest" ) && self HasPerk( "specialty_rof" ) && self HasPerk( "specialty_fastreload" ) && self HasPerk( "specialty_quickrevive" ) )
return true;
return false;
}

GiveRandPerk()
{
Perks = StrTok( "specialty_armorvest|specialty_rof|specialty_fastreload|specialty_quickrevive", "|" );
Rand = RandomIntRange( 0, Perks.size );
while( 1 )
{
if( !self HasPerk( Perks[Rand] ) )
{
self SetPerk( Perks[Rand] );
self thread maps\_zombiemode_perks::perk_hud_create( Perk[Rand] );

self thread maps\_zombiemode_perks::perk_think( Perks[Rand] );
break;
}
else
Rand = RandomIntRange( 0, Perks.size );
wait .05;
}
}

Trigger()
{
self waittill( "trigger" );
level.TeddyCount += 1;
}
Last Edit: May 25, 2014, 02:43:21 am by PROxFTW
broken avatar :(
×
broken avatar :(
UM Member, Mapper and 3d Modeler
Location: ca
Date Registered: 8 February 2014
Last active: 5 years ago
Posts
835
Respect
Forum Rank
The Decider
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Port Arthur
×
pashan's Groups
Mapper Has released one or more maps to the UGX-Mods community.
could you possible add bam's electric cherry, vulture aid and other 4 bo perk?

Post Merge: May 25, 2014, 02:51:51 am
Its also giving me this error.  Near line 18

Last Edit: May 25, 2014, 02:51:51 am by pashan
broken avatar :(
×
broken avatar :(
Location: usYork, SC
Date Registered: 15 March 2014
Last active: 7 years ago
Posts
214
Respect
Forum Rank
Mr. Elemental
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
WaW Scriptor
×
PROxFTW's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
PROxFTW's Contact & Social LinksPROxFTWPROxFTWPROxFTWPROxFTW
Code Snippet
Plaintext
TeddyTrig()
{
level.TeddyCount = 0;
Trig = GetEntArray( "ENT", "targetname" );
for( i = 0; i < Trig.size; i++ )
Trig[i] thread Trigger();
        Play = GetPlayers();
for(;;)
{
if( level.TeddyCount == 3 )
{
for( i = 0; i < Play.size; i++ )
                       {
                        if( Play[i] HasAllPerks() )
Play[i].score += 3000; // Dont remember the code in zombiemode_score atm.
else
Play[i] thread GiveRandPerk();
                        }
}
wait .05;
}
}

HasAllPerks()
{
if( self HasPerk( "specialty_armorvest" ) && self HasPerk( "specialty_rof" ) && self HasPerk( "specialty_fastreload" ) && self HasPerk( "specialty_quickrevive" ) && self HasPerk( "specialty_extraammo" ) && self HasPerk( "specialty_detectexplosive" ) && self HasPerk( "specialty_bulletaccuracy" ) && self HasPerk( "specialty_longersprint" ) && self HasPerk( "specialty_boost" ) && self HasPerk( "specialty_ordinance" ) )
return true;
return false;
}

GiveRandPerk()
{
Perks = StrTok( "specialty_armorvest|specialty_rof|specialty_fastreload|specialty_quickrevive|specialty_extraammo|specialty_detectexplosive|specialty_bulletaccuracy|specialty_longersprint|specialty_boost|specialty_ordinance", "|" );
Rand = RandomIntRange( 0, Perks.size );
while( 1 )
{
if( !self HasPerk( Perks[Rand] ) )
{
self SetPerk( Perks[Rand] );
self thread maps\_zombiemode_perks::perk_hud_create( Perks[Rand] );

self thread maps\_zombiemode_perks::perk_think( Perks[Rand] );
break;
}
else
Rand = RandomIntRange( 0, Perks.size );
wait .05;
}
}

Trigger()
{
self waittill( "trigger" );
level.TeddyCount += 1;
}
Last Edit: May 25, 2014, 03:02:50 am by PROxFTW
broken avatar :(
×
broken avatar :(
UM Member, Mapper and 3d Modeler
Location: ca
Date Registered: 8 February 2014
Last active: 5 years ago
Posts
835
Respect
Forum Rank
The Decider
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Port Arthur
×
pashan's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Code Snippet
Plaintext
TeddyTrig()
{
level.TeddyCount = 0;
Trig = GetEntArray( "ENT", "targetname" );
for( i = 0; i < Trig.size; i++ )
Trig[i] thread Trigger();
        Play = GetPlayers();
for(;;)
{
if( level.TeddyCount == 3 )
{
for( i = 0; i < Play.size; i++ )
                       {
                        if( Play[i] HasAllPerks() )
Play[i].score += 3000; // Dont remember the code in zombiemode_score atm.
else
Play[i] thread GiveRandPerk();
                        }
}
wait .05;
}
}

HasAllPerks()
{
if( self HasPerk( "specialty_armorvest" ) && self HasPerk( "specialty_rof" ) && self HasPerk( "specialty_fastreload" ) && self HasPerk( "specialty_quickrevive" ) && self HasPerk( "specialty_extraammo" ) && self HasPerk( "specialty_detectexplosive" ) && self HasPerk( "specialty_bulletaccuracy" ) && self HasPerk( "specialty_longersprint" ) && self HasPerk( "specialty_boost" ) && self HasPerk( "specialty_ordinance" ) )
return true;
return false;
}

GiveRandPerk()
{
Perks = StrTok( "specialty_armorvest|specialty_rof|specialty_fastreload|specialty_quickrevive|specialty_extraammo|specialty_detectexplosive|specialty_bulletaccuracy|specialty_longersprint|specialty_boost|specialty_ordinance", "|" );
Rand = RandomIntRange( 0, Perks.size );
while( 1 )
{
if( !self HasPerk( Perks[Rand] ) )
{
self SetPerk( Perks[Rand] );
self thread maps\_zombiemode_perks::perk_hud_create( Perk[Rand] );

self thread maps\_zombiemode_perks::perk_think( Perks[Rand] );
break;
}
else
Rand = RandomIntRange( 0, Perks.size );
wait .05;
}
}

Trigger()
{
self waittill( "trigger" );
level.TeddyCount += 1;
}

Another Error



Thanks for your help btw
broken avatar :(
×
broken avatar :(
Location: usYork, SC
Date Registered: 15 March 2014
Last active: 7 years ago
Posts
214
Respect
Forum Rank
Mr. Elemental
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
WaW Scriptor
×
PROxFTW's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
PROxFTW's Contact & Social LinksPROxFTWPROxFTWPROxFTWPROxFTW
Should be fixed now. Sorry about that.
broken avatar :(
×
broken avatar :(
UM Member, Mapper and 3d Modeler
Location: ca
Date Registered: 8 February 2014
Last active: 5 years ago
Posts
835
Respect
Forum Rank
The Decider
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Port Arthur
×
pashan's Groups
Mapper Has released one or more maps to the UGX-Mods community.
did u updated the script u previously posted?
broken avatar :(
×
broken avatar :(
Location: usYork, SC
Date Registered: 15 March 2014
Last active: 7 years ago
Posts
214
Respect
Forum Rank
Mr. Elemental
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
WaW Scriptor
×
PROxFTW's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
PROxFTW's Contact & Social LinksPROxFTWPROxFTWPROxFTWPROxFTW
Yah the newer one of the 2.
broken avatar :(
×
broken avatar :(
UM Member, Mapper and 3d Modeler
Location: ca
Date Registered: 8 February 2014
Last active: 5 years ago
Posts
835
Respect
Forum Rank
The Decider
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Port Arthur
×
pashan's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Sorry for bothering you but i modified you script (to make it give 4500 points instead of the perk because it gave all the perks)

Code Snippet
Plaintext
#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;

main()
{
level.TeddyCount = 0;
Trig = GetEntArray( "fake_trigger", "targetname" );
for( i = 0; i < Trig.size; i++ )
Trig[i] thread Trigger();
        Play = GetPlayers();
for(;;)
{
if( level.TeddyCount == 3 )
{
players = getplayers();
for(i=0;i<players.size;i++)
    players[i] maps\_zombiemode_score::add_to_player_score(4500);
                       
}
wait .05;
}
}



Trigger()
{
self waittill( "trigger" );
level.TeddyCount += 1;
iprintln("Teddy!!!!");

}

But could you help me fix this:



it gives me 4500 constantly
Marked as best answer by pashan 12 years ago
broken avatar :(
×
broken avatar :(
Location: usYork, SC
Date Registered: 15 March 2014
Last active: 7 years ago
Posts
214
Respect
Forum Rank
Mr. Elemental
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
WaW Scriptor
×
PROxFTW's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
PROxFTW's Contact & Social LinksPROxFTWPROxFTWPROxFTWPROxFTW
Code Snippet
Plaintext
#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;

main()
{
level.TeddyCount = 0;
Trig = GetEntArray( "fake_trigger", "targetname" );
for( i = 0; i < Trig.size; i++ )
Trig[i] thread Trigger();
        Play = GetPlayers();
for(;;)
{
if( level.TeddyCount == 3 )
{
players = getplayers();
for(i=0;i<players.size;i++)
    players[i] maps\_zombiemode_score::add_to_player_score(4500);
                        break;
}
wait .05;
}
}



Trigger()
{
self waittill( "trigger" );
level.TeddyCount += 1;
iprintln("Teddy!!!!");

}
Oh sorry forgot the break for both, but if you want me to fix it with the perk, will take me 2 seconds but whatever you want.
Last Edit: May 25, 2014, 03:26:14 am by PROxFTW

 
Loading ...