Game Modding | Call of Duty: Black Ops 3 | Scripting
ModmeBot:
Thread By: Ahmed02354
I want to put a grenade on the ground and when people shoot it I want it to explode and disapear.
How can i do this?
ModmeBot:
Reply By: Dan9977
function shootable()
{
trig = GetEnt("shootable_trig", "targetname");
model = GetEnt("shootable_model", "targetname");
trig SetHintString("");
trig SetCursorHint("HINT_NOICON");
while(1)
{
trig_1 waittill("trigger", player)
break;
}
trig Delete();
model Delete();
}
ModmeBot:
Reply By: Dan9977
I made a mistake in the script. trig_1 should be trig.
Also, make sure to put level thread shootable(); in the main function of your mapname.gsc and the shootable script at the bottom of mapname.gsc.
ModmeBot:
Reply By: Ahmed02354
Dan9977
I made a mistake in the script. trig_1 should be trig. Also, make sure to put level thread shootable(); in the main function of your mapname.gsc and the shootable script at the bottom of mapname.gsc.