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

exo zombies credit dispensers

broken avatar :(
Created 11 years ago
by death_reaper0
0 Members and 1 Guest are viewing this topic.
2,983 views
broken avatar :(
×
broken avatar :(
Location: aupotato
Date Registered: 27 September 2013
Last active: 5 years ago
Posts
588
Respect
Forum Rank
Zombie Enslaver
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Signature
respect the dead

donates greatly appreciated :) paypal.me/F3ARxReaper666
discord server:
https://discord.gg/tsGHW99
×
death_reaper0's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
this is just something i made while bored, the map i was working on at the time had countless errors and i just couldn't be bothered fixing at the time, so i made this! (don't worry, its tested and working!)

video:
https://youtu.be/UlYowAZ43ko


features:
customization on the chances, and points it can give
is affected by double points
can have as many as you want!
will turn off when used and reactivate itself later on
random chance of a jackpot! (lots of points)


first of all you will need to find ANY gsc script found in codwaw root/raw/maps.
copy and paste that script (clone it) then rename it to
Code Snippet
Plaintext
aw_credit_dispense

open that file and replace EVERYTHING with the following code
Code Snippet
Plaintext
#include maps\_utility; 
#include common_scripts\utility;
#include maps\_zombiemode_utility;

init()
{
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//tweekables - the following lines can be edited to your needs!
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//chances! these should be between 0-100 (zero means no chance)
level.is_active_chance = 75; //percent chance that it will be on at the start
level.jackpot_chance = 5; //percent chance of jackpot (LOTS of point, default between 600-1200) make 0 to disable
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//points!
level.normal_points = 100; //amount of points it will normally give
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//jackpot!
level.jackpot_lowest_points = 60; //lowest amount jackpot can give (note: it will multiply by 10)
level.jackpot_highest_points = 120; //highest amount jackpot can give (note: it will multiply by 10)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//down time /aka/ temporary disabled
level.down_time_min = 60; //min amount of seconds to wait til back online
level.down_time_max = 300; //max amount of seconds to wait til back online
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//end of tweekables, feel free to modify and scripts below if you know what your doing!
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

credit_dispense = GetEntArray( "credit_dispense", "targetname" );
for( i = 0; i < credit_dispense.size; i++ )
{
credit_dispense[i] thread check_if_on();
}

}

check_if_on()
{
self SetHintString( "" );
self SetCursorHint( "HINT_NOICON" );
self UseTriggerRequireLookAt();
if(randomint(100) < level.is_active_chance)
self.on =true;
else
self.on = false;
wait .1;
if (self.on == true)
self thread trigger_active();
else
self thread trigger_down_time();
}

trigger_down_time()
{
self.on = false;
self SetHintString( "" );
self.time_to_wait = randomintrange(level.down_time_min ,level.down_time_max);
wait self.time_to_wait;
self.on =true;
self thread trigger_active();
}

trigger_active()
{
self SetHintString( "HOLD &&1 FOR ^3CREDITS" );
self waittill( "trigger", player );
player thread point_gain( player );
self thread trigger_down_time();
}

point_gain( user )
{
if(randomint(100) < level.jackpot_chance)
{
user.point_total = randomintrange(level.down_time_min,level.down_time_max);
wait 2;
user iPrintLnBold("^7OVERIDE ENABLED");
wait 2;
while(user.point_total > 0)
{
user thread maps\_zombiemode_score::add_to_player_score( 10 * level.zombie_vars["zombie_point_scalar"] );
user.point_total-=1;
wait 0.1;
if (user.point_total < 1)
break;
}
}
else
{
points = level.normal_points * level.zombie_vars["zombie_point_scalar"];
user playlocalsound("cha_ching");
user iPrintLnBold("^7+" + points + " CREDITS");
user thread maps\_zombiemode_score::add_to_player_score( points );
}
}

you can change anything at the top of the script to your liking if you wish ( the parts with all the /'s )
note: ONLY change the numbers there

now save that file and copy it to codwaw root/mods/YOUR MAP NAME/maps

next open up your maps _zombimode.gsc and under
Code Snippet
Plaintext
	maps\_zombiemode_auto_turret::init();
place
Code Snippet
Plaintext
	maps\aw_credit_dispense::init();

now for the FUN part

open up you map in radiant and create a trigger use by right clicking on the 2D view and going trigger > trigger use

now while its selected press N on your keyboard and insert these KVPS
Code Snippet
Plaintext
targetname
Code Snippet
Plaintext
credit_dispense
you can copy and plaste this wherever and as many times as you want to!

please give credit if used, and have a nice day! :D

Fixed the centered text in the code box as was nearly unreadable lol - Harrybo21

Double Post Merge: November 10, 2015, 07:46:40 am
thanks harry, that was kinda last minute, didnt really preview it xD
Last Edit: November 10, 2015, 07:46:40 am by death_reaper0

 
Loading ...