
Posts
184
Respect
39Add +1
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!
//******************************************************
// Buildable Bridge
//******************************************************
#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;
#include maps\_anim;
//////////////////////////////////
//Credits
//////////////////////////////////
/*
ZK: This script
Don Goony: knuckle_crack()
sedozz
*/
//////////////////////////////////
main()
{
level.bridge_build = 0;
thread lets_build();
}
lets_build()
{
flag_wait("all_players_connected");
players = get_players();
for(i=0;i<players.size;i++)
{
players[i].part_hud = [];
}
//the plank
plank_pick = getEnt("plank_pick", "targetname"); //plank that you pick up
plank_pick_trig = getEnt("plank_pick_trig", "targetname"); //trigger to pick up plank
plank_build = getEnt("plank_build", "targetname"); //the plank that appears when built
plank_build_trig = getEnt("plank_build_trig", "targetname"); //trigger to build plank
//part 1
thread build_part(plank_pick, plank_pick_trig, plank_build, plank_build_trig);
}
build_part(part, part_trig, place_part, place_part_trig)
{
da_guy = undefined;
place_part hide();
place_part_trig UseTriggerRequireLookAt();
place_part_trig SetCursorHint( "HINT_NOICON" );
place_part_trig setHintString("Parts required");
part_trig UseTriggerRequireLookAt();
part_trig SetCursorHint( "HINT_NOICON" );
part_trig setHintString("Press &&1 to pick up part");
part_trig waittill("trigger", da_guy);
part_trig delete();
part delete();
place_part_trig enable_trigger();
place_part_trig sethintstring("Press &&1 to add part");
place_part_trig setvisibletoplayer(da_guy);
for(;;)
{
place_part_trig waittill("trigger", da_guy);
if( !isDefined(da_guy.is_adding_part) )
{
da_guy.is_adding_part = true;
place_part_trig delete();
da_guy thread crack_knuckles();
da_guy waittill("part_added");
hud destroy_hud();
place_part show();
level.bridge_build = level.bridge_build + 1;
if(level.bridge_build == 1)
{
thread bridge_ready();
}
wait 1.5;
da_guy.is_adding_part = undefined;
break;
}
wait .5;
}
}
bridge_ready() //this is what runs when you add all the parts
{
wait 6;
wait 1;
}
crack_knuckles()
{
self DisableOffhandWeapons();
self DisableWeaponCycling();
self AllowLean( false );
self AllowAds( false );
self AllowSprint( false );
self AllowProne( false );
self AllowMelee( false );
if ( self GetStance() == "prone" )
{
self SetStance( "crouch" );
}
primaries = self GetWeaponsListPrimaries();
gun = self GetCurrentWeapon();
ammo = self GetWeaponAmmoStock( gun );
weapon = "zombie_knuckle_crack";
self GiveWeapon( weapon );
self SwitchToWeapon( weapon );
self waittill_any( "fake_death", "death", "player_downed", "weapon_change_complete" );
self EnableOffhandWeapons();
self EnableWeaponCycling();
self GiveWeapon( gun );
self SetWeaponAmmoStock( gun, ammo );
self SwitchToWeapon( gun );
self AllowLean( true );
self AllowAds( true );
self AllowSprint( true );
self AllowProne( true );
self AllowMelee( true );
self notify("part_added");
return gun;
}