Modme Forums

TUT:How to Spawn Grenades

Game Modding | Call of Duty: Black Ops 3 | Scripting


Thread By: ihmiskeho
This is a simple tutorial on how to spawn grenades on any entity. Similar to how Origins digsites and SOE pods work.

There's actually a script function in BO3 for this that can be found in the scriptapifunctions:

How to use:
ent MagicGrenadeType(<grenade weaponfile="">, <spawnspot>, <velocity(x,y,z)>, <blowup time="">)</blowup></velocity(x,y,z)></spawnspot></grenade>
Blowup time is optional. Ent can be any entity (trigger, player etc.)

This is what I used for a digsite script:
//Self = trigger
self MagicGrenadeType( GetWeapon("frag_grenade"), self.origin, (0,0,250));
This will spawn a frag grenade on triggers origin going 250 units up.

Hopefully someones finds this useful. No need for a credit, since this is just a basic BO3 function and not something I've made.