Advertisement
irishstorm

vfds

Dec 22nd, 2012
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. public var canDropItem : boolean = false;
  2. public var itemList : GameObject[];
  3. public var spawnPos : Transform;
  4.  
  5. // To make this function work, Add it to when zombies die.
  6. function SpawnItems()
  7. {
  8. if(canDropItem)
  9. {
  10. var item : GameObject = itemList[Random.Range( 0, itemList.Length)];
  11. var itemdrop = Instantiate(item, spawnPos.position, spawnPos.rotation);
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement