var gun_id = 0;
define guns_max = 8; // only 8 guns in this game
TEXT gun_strs {
pos_x = 0;
pos_y = 0;
strings = guns_max;
string = "Mental Manni's Middle Finger";
string = "Machine Gun";
string = "Shotgun";
string = "Rocket Launcher";
string = "Granny Panties";
string = "Bear Trap";
string = "Rolling Papers";
string = "Bob Saget's Decapitated Head";
}
// add to above
TEXT gun_display {
pos_x = 0;
pos_y = 0;
strings = 1;
}
function gun_show(gunn_id) {
gunn_id %= guns_max;
str_cpy(gun_display.string[0], gun_strs.string[gunn_id]);
return(gunn_id);
}
function gun_next() {
gun_id += 1; gun_id = gun_show(gun_id);
}
function gun_prev() {
gun_id -= 1; gun_id = gun_show(gun_id);
}
define _gun_id, skill?;
function gun_grab_event() {
my.event_impact = NULL;
gun_show(my._gun_id);
my._gun_id = -1;
}
function gun_spawn(gunn_id);
my._gun_id = gunn_id;
my.enable_impact = on;
my.event_impact = gun_grab_event;
while(ME != NULL) {
if (my._gun_id <= -1) {
break;
}
wait(1);
}
ent_remove(me);
}