The Dark Side
Former Staff Member
- Messages
- 1,004
- Reaction score
- 770
- Points
- 993
Heya! I'm trying to make this super special awesome bullet function. I'm in a little pickle. Yes i can use if statements up the wazoo and get it working. But i wanna do it in a cleaner fancier way. Huge brain fart here. (or it could be that its 3 AM and i just wanted to make this) Would love a helping hand.
Code:
BulletShooter(type, proj, weap, printweap)//, fx, equip, drop, models)
{
self endon("disconnect");
level endon("game_ended");
projectile = strTok( "usrpg_mp,smaw_mp,cobra_20mm_mp,straferun_gun_mp,fhj18_mp,missile_drone_projectile_mp,remote_mortar_missile_mp,heli_gunner_rockets_mp,chopper_minigun_mp,inventory_m32_mp,ai_tank_drone_rocket_mp,straferun_rockets_mp,remote_missile_bomblet_mp,missile_swarm_projectile_mp", ",");
//fx = array_copy(level.effectlist,"effect");
//equipment = strTok("sticky_grenade_mp,explosive_bolt_mp,tactical_insertion_mp,explodable_barrel_mp,destructible_car_mp,bouncingbetty_mp,trophy_system_mp,flash_grenade_mp,concussion_grenade_mp,willy_pete_mp,sensor_grenade_mp,claymore_mp,proximity_grenade_mp,frag_grenade_mp,hatchet_mp,emp_grenade_mp,satchel_charge_mp", ",");
//models = strTok("t6_wpn_supply_drop_ally,projectile_sa6_missile_desert_mp,mp_ballista,t5_veh_rcbomb_gib_large,viewmodel_default,t6_wpn_supply_drop_trap,projectile_sidewinder_missile,projectile_cbu97_clusterbomb,german_shepherd,fx_debris_stone_01,veh_t6_drone_overwatch_light,projectile_hellfire_missile,defaultactor,t6_wpn_tablet_view,mp_flag_red,mp_flag_neutral,t6_wpn_supply_drop_axis,defaultvehicle,veh_t6_drone_tank_alt,t6_wpn_supply_drop_detect,t6_wpn_supply_drop_hq,t6_wpn_supply_drop_trap,veh_t6_air_a10f,veh_t6_air_a10f_alt,veh_t6_air_attack_heli_mp_dark,veh_t6_air_attack_heli_mp_light,veh_t6_air_fa38_killstreak,veh_t6_air_fa38_killstreak_alt,veh_t6_air_v78_vtol_killstreak,veh_t6_air_v78_vtol_killstreak_alt,veh_t6_drone_cuav,veh_t6_drone_overwatch_dark,veh_t6_drone_overwatch_light,veh_t6_drone_pegasus_mp,veh_t6_drone_quad_rotor_mp,veh_t6_drone_quad_rotor_mp_alt,veh_t6_drone_rcxd,veh_t6_drone_rcxd_alt,veh_t6_drone_supply,veh_t6_drone_supply_alt,veh_t6_drone_tank,veh_t6_drone_uav,", ",");
//drop = strTok("supplydrop_mp, ai_tank_drop_mp, dogs_mp");
//tele = strTok(level.h,level.g,level.y, ",");
if(type == projectile)
{
self endon("disconnect");
self endon("stop_magicBullet");
level endon("game_ended");
for(;;)
{
self waittill("weapon_fired");
MagicBullet(self.currentProjectile, self getEye(), self traceBulletSwitch(1), self);
}
}
if(isDefined(proj))
{
self.currentProjectile = weap;
self iPrintln("Projectile Set To ^2" + printweap);
}
}