Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public var canDropItem : boolean = false;
- public var itemList : GameObject[];
- public var spawnPos : Transform;
- // To make this function work, Add it to when zombies die.
- function SpawnItems()
- {
- if(canDropItem)
- {
- var item : GameObject = itemList[Random.Range( 0, itemList.Length)];
- var itemdrop = Instantiate(item, spawnPos.position, spawnPos.rotation);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement