Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Knox on Wed 12/05/2010 04:03:54

Title: Player starts with Inv...Properties Flag vs Game_Start
Post by: Knox on Wed 12/05/2010 04:03:54
For learning purposes, I was wondering what the main difference is between adding an inventory item in game_start within the global script vs. setting the option "player starts with item" to "true" in the item's property box.

function game_start()
{
  //Add Default Inventory items
  player.AddInventory(iWatch);
}


Is one way "better" or "faster"  than the other or are  they equally the same in terms of memory/computation (which I doubt would be very much anyways since its pretty simple).

Im guessing its the same thing?
Title: Re: Player starts with Inv...Properties Flag vs Game_Start
Post by: Dualnames on Wed 12/05/2010 11:27:46
Quote from: general_knox on Wed 12/05/2010 04:03:54
For learning purposes, I was wondering what the main difference is between adding an inventory item in game_start within the global script vs. setting the option "player starts with item" to "true" in the item's property box.

function game_start()
{
  //Add Default Inventory items
  player.AddInventory(iWatch);
}


Is one way "better" or "faster"  than the other or are  they equally the same in terms of memory/computation (which I doubt would be very much anyways since its pretty simple).

Im guessing its the same thing?

It's the same thing. I just prefer to do set the property of the inventory, as it's easier and faster to beta-test sth. Also imagine starting with like 100 inventory items, it'd be a pain in the ass to do it there. Or it wouldn't be possible if you want a quantity over 1 of an item.
Title: Re: Player starts with Inv...Properties Flag vs Game_Start
Post by: Knox on Wed 12/05/2010 17:52:21
Ah ok, thats what I thought. True, once you have a lot of items it will be pretty long to add them that way in the script.