
Posts
2,148
Respect
346Add +1
Forum Rank
King of the Zombies
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!![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
#include maps\_utility;
#include common_scripts\utility;
#include maps\_zombiemode_utility;
init()
{
thread kar98k_chalk();
}
//Kar98k Chalk
kar98k_chalk()
{
da_guy = undefined;
kar98k = getent( "kar98k", "target" );
kar98k setCursorHint( "HINT_NOICON" );
kar98k disable_trigger();
kar98k_build = getent( "kar98k_build", "targetname" );
kar98k_build setCursorHint( "HINT_NOICON" );
kar98k_build sethintstring ("Press and Hold &&1 to Build Kar98k Chalk");
kar98k_build disable_trigger();
trigger = getent( "kar98k_test", "targetname" );
trigger setCursorHint("HINT_NOICON");
trigger sethintstring("Press &&1 to Pick up Kar98k Chalk");
trigger waittill ("trigger");
trigger delete();
kar98k_build enable_trigger();
kar98k_build waittill("trigger");
if( !isDefined(da_guy.is_adding_part) )
{
da_guy.is_adding_part = true;
kar98k_build delete();
da_guy thread crack_knuckles();
da_guy waittill("part_added");
wait 1.5;
kar98k enable_trigger();
da_guy.is_adding_part = undefined;
}
}
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" );
}
gun = self GetCurrentWeapon();
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 SwitchToWeapon( gun );
self AllowLean( true );
self AllowAds( true );
self AllowSprint( true );
self AllowProne( true );
self AllowMelee( true );
self notify("part_added");
return gun;
}![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
var = undefined; //the variable has to be set before the actual script i chose to make it undefined
switch(var){ // var is the variable
case "1": // what the first option the variable could be
break; // how to end a case
case "2": // what the second option the variable could be
break;
}![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
the way I would have done it would be have all the drawable weapon triggers off the map. (ones you find in your zombiemode prefabs). then when the players draws on a questionmark, set the origin of the gun the chalk represents, to that questionmark
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
the way I would have done it would be have all the drawable weapon triggers off the map. (ones you find in your zombiemode prefabs). then when the players draws on a questionmark, set the origin of the gun the chalk represents, to that questionmark
