Login Issues
Activate Issues
Other Problems?
function bgb_activate(){ self endon("disconnect"); if(!isDefined(self.bgb_active)) { self.bgb_active = true; self upgrade_knuckle_crack_begin(); self waittill("weapon_change_complete"); self upgrade_knuckle_crack_end(); self.bgb_active = undefined; }}function upgrade_knuckle_crack_begin(){ self zm_utility::increment_is_drinking(); self zm_utility::disable_player_move_states(true); primaries = self GetWeaponsListPrimaries(); original_weapon = self GetCurrentWeapon(); weapon = GetWeapon("zombie_knuckle_crack"); if(original_weapon != level.weaponNone && !zm_utility::is_placeable_mine(original_weapon) && !zm_equipment::is_equipment(original_weapon)) { self notify("zmb_lost_knife"); self TakeWeapon(original_weapon); } else return; self GiveWeapon(weapon); self SwitchToWeapon(weapon);}function upgrade_knuckle_crack_end(){ self zm_utility::enable_player_move_states(); weapon = GetWeapon("zombie_knuckle_crack"); if(self laststand::player_is_in_laststand()) { self TakeWeapon(weapon); return; } self zm_utility::decrement_is_drinking(); self TakeWeapon(weapon); primaries = self GetWeaponsListPrimaries(); if(IS_DRINKING(self.is_drinking)) return; else self zm_weapons::switch_back_primary_weapon(); self thread bgb_action();}function bgb_action(){ self endon("bgb_done"); range = 120; rangeSQ = range**2; //since we're using distanceSquared self thread electrocuting_ambient(range); //would be cool to have a cool 'electrocuting' sound //kills = 0; //max_kills = 12; AI = GetAITeamArray("axis"); AI = self getClosestSQ(AI, rangeSQ); for(i = 0; i < AI.size; i++) { if(isDefined(AI[i].is_brutus)) continue; fx_duration = RandomFloatRange(0.2, 0.3); AI[i] FreezeControls(true); //idk how to freeze a zombie lol ;( AI[i] SetElectrified(fx_duration); //idk if this plays an fx on the zombies wait RandomFloatRange(0.1, 0.2); //or time divided by 10 if I use IntRange self notify("electrocuting_zombies"); //starting the earthquake and the sound AI[i] SetPlayerCollision(false); //hopefully makes me able to walk through the zombies while(fx_duration <= 0) { //bo2's fx - electric_cherry_reload_fx //or a fire fx idk what looks good zombie/fx_aat_blast_furnace_zmb PlayFxOnTag(level._effect["electric_cherry_explode"], AI[i], "j_head"); PlayFxOnTag(level._effect["electric_cherry_explode"], AI[i], "J_Spine1"); PlayFxOnTag(level._effect["electric_cherry_explode"], AI[i], "J_Spine4"); PlayFxOnTag(level._effect["electric_cherry_explode"], AI[i], "pelvis"); fx_duration -= 0.09; //just to add more randomness wait 0.05; } wait 0.05; AI[i] FreezeControls(false); AI[i] DetachAll(); AI[i] DoDamage(AI[i].health + 1, self.origin, self); //self zm_score::add_to_player_score(100); //or less idk wait 0.05; }}//idk how else I can do this in a 'clean' wayfunction electrocuting_ambient(range) //doing this so that there's only one eathquake{ self endon("bgb_done"); self waittill("electrocuting_zombies"); PlaySoundAtPosition("zmb_cherry_explode", self.origin); Earthquake(0.22, 0.3, self.origin, range);}function getClosestSQ(ents, rangeSQ) //SQ = squared{ index = 0; //index for the new array newArr = []; for(i = 0; i < ents.size; i++) { if(DistanceSquared(self.origin, ents[i].origin) <= rangeSQ) //using distance squared since its faster { newArr[index] = ents[i]; index++; } } return newArr;}
What is it you want? I can't get anything from a wall of a script.