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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - BrandynNew



Beautiful map!
7 years ago
Hello, I am trying to make a perk that changes a clientDvar, and I should know how to, but when the script checks if the player doesn't have the perk, it resets the Dvar. However, I don't know what to set the Dvar to. Any help would be appreciated!
7 years ago
Ok, thank you. I understand more now. HarryBo21 did make a script for custom triggers, if that would be relevant here.
7 years ago
Yes, I understand. I watched one of zomb1e-kllr's videos on youtube, and he showed a picture of the WaW multiplayer perks or specialty's as he made his own custom perk. I then looked at Harry's perk's specialties, and what Paranormal Potion had. With those, there are about ten left to choose from. If I wanted PP, Harry's perk's, and mine, they need to all be different, correct?
7 years ago
Thank you so much!

Here's what I'm thinking:
Change the stuff in your first reply,
Use the script you placed last and integrate it as scriptz did,
Change the hintstring as you said,
And use the same KVP's, of course changing the specialty_ and pp to boxbooze.

If that's it, I should have it put together very soon. I plan on releasing it on UGX.
7 years ago
Thank you! I'm sure it would be almost unneedlessly complicated to change the string otherwise, so using that will be just fine!

Double Post Merge: November 17, 2016, 06:56:47 pm
I'm very sorry for having some many questions, you don't have to answer this if I've irritated you, but what allows you to write an if-then statement to change, say, the box cost, but not to change a hintstring? I've never scripted before, and I don't understand why you can do one but not the other.
7 years ago
I am creating a custom perk, and I want to change the box price. death_reaper0 helped me out there, however, he said it was more complicated than he wanted to get into to change the hintstring for the box. Any help would be appreciated!
7 years ago
Tonight (in America, so about 6 or 7 hours), I'll get home and I can attach the file on scriptz's Paranormal Potion. You can then see what you think and what you would do.

Double Post Merge: November 17, 2016, 03:33:49 am
Alrighty, so scriptz has the following script for Paranormal Potion:

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

init()
{

PrecacheItem( "zombie_perk_bottle_revive" );
PrecacheShader( "byz_pp_shader" );

pp_trigger = GetEnt( "zombie_vending_pp", "targetname" );

pp_trigger thread pp_trigger_think();

level thread maps\_zombiemode_perks::machine_watcher_factory("pp_on");

thread wait_a_little();
thread turn_pp_on();

}


wait_a_little()
{

flag_wait( "all_players_connected" );

players = get_players();
for(i=0;i<players.size;i++)
{
players[i] thread pp_think();
}

}

pp_think()
{

flag_wait( "all_players_connected");


while(1)
{

if(self hasPerk("specialty_leadfoot"))
{

self SetClientDvars("g_gravity", "100");

}
wait .01;
}


wait .01;
}

turn_pp_on()
{
machine = getent("vending_pp", "targetname");

level waittill("juggernog_on");

machine vibrate((0,-100,0), 0.3, 0.4, 3);
machine playsound("perks_power_on");
machine thread maps\_zombiemode_perks::perk_fx("doubletap_light");


level notify( "specialty_leadfoot_power_on" );
}


pp_trigger_think()
{

perk = "specialty_leadfoot";

self SetHintString( &"ZOMBIE_FLAMES_UNAVAILABLE" );
self SetCursorHint( "HINT_NOICON" );
self UseTriggerRequireLookAt();

notify_name = perk + "_power_on";

level waittill("juggernog_on");

perk_hum = spawn("script_origin", self.origin);
perk_hum playloopsound("perks_machine_loop");

self thread check_player_has_perk(perk);

self SetHintString("^3Press & Hold &&1 To Buy Paranormal Potion ^2[Cost: 2000]");

for( ;; )
{
self waittill( "trigger", player );
index = maps\_zombiemode_weapons::get_player_index(player);

cost = 2000;

if (player maps\_laststand::player_is_in_laststand() )
{
continue;
}

if(player in_revive_trigger())
{
continue;
}

if( player isThrowingGrenade() )
{
wait( 0.1 );
continue;
}

if( player isSwitchingWeapons() )
{
wait(0.1);
continue;
}

if ( player HasPerk( perk ) )
{
self playsound("deny");
player thread maps\_zombiemode_perks::play_no_money_perk_dialog();
continue;
}

if ( player.score < cost )
{
self playsound("deny");
player thread maps\_zombiemode_perks::play_no_money_perk_dialog();
continue;
}

sound = "bottle_dispense3d";
player achievement_notify( "perk_used" );
playsoundatposition(sound, self.origin);
player maps\_zombiemode_score::minus_to_player_score( cost );


sting = "byz_pp_sting";

playsoundatposition(sting, self.origin);

gun = player perk_give_bottle_begin();
player.is_drinking = 1;
player waittill_any( "fake_death", "death", "player_downed", "weapon_change_complete", "whoswho_death" );

// restore player controls and movement
player perk_give_bottle_end( gun, "specialty_leadfoot" );
player.is_drinking = undefined;
// TODO: race condition?
if ( player maps\_laststand::player_is_in_laststand() )
{
continue;
}

player SetPerk("specialty_leadfoot");

player thread maps\_zombiemode_perks::perk_vo(perk);
player setblur( 4, 0.1 );
wait(0.1);
player setblur(0, 0.1);


player perk_hud_create( perk );

//stat tracking
player.stats["perks"]++;

//player iprintln( "Bought Perk: " + perk );
bbPrint( "zombie_uses: playername %s playerscore %d round %d cost %d name %s x %f y %f z %f type perk",
player.playername, player.score, level.round_number, cost, perk, self.origin );

player thread perk_think( perk );

}
}

check_player_has_perk(perk)
{
dist = 128 * 128;
while(true)
{
players = get_players();
for( i = 0; i < players.size; i++ )
{
if(DistanceSquared( players[i].origin, self.origin ) < dist)
{
if(!players[i] hasperk(perk) && !(players[i] in_revive_trigger()) && (players[i].perk_hud.size < level.perk_limit))
{
if (IsDefined(level.script) && level.script == "nazi_zombie_theater")
self setinvisibletoplayer(players[i], false);
else
self setvisibletoplayer(players[i]);
}
else
{
self SetInvisibleToPlayer(players[i]);
}
}


}

wait(0.1);

}

}

perk_hud_create( perk )
{
if ( !IsDefined( self.perk_hud ) )
{
self.perk_hud = [];
}

shader = "byz_pp_shader";


hud = create_simple_hud( self );
hud.foreground = true;
hud.sort = 1;
hud.hidewheninmenu = false;
hud.alignX = "left";
hud.alignY = "bottom";
hud.horzAlign = "left";
hud.vertAlign = "bottom";
hud.x = self.perk_hud.size * 30;
hud.y = hud.y - 70;
hud.alpha = 1;
hud SetShader( shader, 24, 24 );

self.perk_hud[ perk ] = hud;
}

perk_think()
{

self waittill_any( "fake_death", "death", "player_downed", "whoswho_death" );

self UnsetPerk("specialty_leadfoot");
self SetClientDvars("g_gravity", "800");
self maps\_zombiemode_perks::perk_hud_destroy("specialty_leadfoot");

}

perk_give_bottle_begin()
{
self DisableOffhandWeapons();
self DisableWeaponCycling();

self AllowLean( false );
self AllowAds( false );
self AllowSprint( false );
self AllowProne( false );
self AllowMelee( false );

wait( 0.05 );

if ( self GetStance() == "prone" )
{
self SetStance( "crouch" );
}

gun = self GetCurrentWeapon();
weapon = "";

self GiveWeapon("zombie_perk_bottle_revive");
self SwitchToWeapon("zombie_perk_bottle_revive");

return gun;
}

perk_give_bottle_end( gun, perk )
{
assert( gun != "zombie_perk_bottle_revive" );
assert( gun != "syrette" );

self EnableOffhandWeapons();
self EnableWeaponCycling();

self AllowLean( true );
self AllowAds( true );
self AllowSprint( true );
self AllowProne( true );
self AllowMelee( true );
weapon = "";

weapon = "zombie_perk_bottle_revive";


// TODO: race condition?
if ( self maps\_laststand::player_is_in_laststand() )
{
self TakeWeapon(weapon);
return;
}

if ( gun != "none" && gun != "mine_bouncing_betty" )
{
self SwitchToWeapon( gun );
}
else
{
// try to switch to first primary weapon
primaryWeapons = self GetWeaponsListPrimaries();
if( IsDefined( primaryWeapons ) && primaryWeapons.size > 0 )
{
self SwitchToWeapon( primaryWeapons[0] );
}
}

self TakeWeapon(weapon);
}

In Radiant, he has a prefab with a trigger, model, and script_struct. KVP's include:

Trigger:
script_string   pp_perk
target   vending_pp
targetname   zombie_vending_pp
script_noteworthy   specialty_leadfoot

Brushmodel:
script_string   pp_perk
targetname   vending_pp

script_struct:
script_struct   pp_perk
targetname   perksacola
classname   script_struct

How should I change this, because I believe it is specific to the previous script. Also, what would I put in my script_struct and trigger KVP's if I only edit in _zombiemode_weapons?
7 years ago
Wow, you are incredible! Thank you very much! I do not have modtools installed right now, I kept receiving errors and I uninstalled them and want to make sure I do it right this time. However, I will install them tonight and get back to you very soon. Quick question: what should I put in the script, because it contains all of the functions for playing the song, waiting till power is on, etc. Can I just delete the if-then statement and it will run smoothly? Thanks again!!
7 years ago
Still need help dudes.

FEARxReaper's Bonfire Sale Script (http://www.zombiemodding.com/index.php?topic=18785.msg165524#msg165524) has the following code:

Code Snippet
Plaintext
bonfire_powerup( drop_item, player_won )
{
iPrintLnBold("^7Bonfire Sale");
level.pap_cost = 1000;

wait ( 30 );

iPrintLnBold("^7Bonfire Sale Over");
level.pap_cost = 5000;
}

Could I somehow modify that to say something like:

Code Snippet
Plaintext
level.box_cost = 600

When the player has the perk?
7 years ago
Sounds good, thank you very much!
7 years ago
Looks sweet! Just to make sure I do it right, how do you install it? Are there instructions included?
7 years ago
Any idea about how many are used or how to remove unneeded ones?
7 years ago
Loading ...