Good work I'm sure, but may I suggest renaming the struct from "IA" to "InvAmount" to reduce the probability of it clashing with other modules?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: TheJBurger on Fri 22/06/2007 03:25:15
I just replaced the plugin and used an overlay instead. Try downloading it and tell me if it works.
Quote from: Rix on Sun 17/06/2007 13:00:31
Its horrible, they could of came up with thousands of different and better designs than this.
// main global script
function GiveMoney(int amount) {
player.InventoryQuantity[iDollars.ID] += amount; // add dollars
iDollars.Name = String.Format("%d dollars", player.InventoryQuantity[iDollars.ID]); // update inv item name
UpdateInventory();
}
function LoseMoney(int amount) {
if (player.InventoryQuantity[iDollars.ID] - amount < 0) {
player.InventoryQuantity[iDollars.ID] = 0; // avoid negative value
}
else player.InventoryQuantity[iDollars.ID] -= amount; // substract dollars
iDollars.Name = String.Format("%d dollars", player.InventoryQuantity[iDollars.ID]); // update inv item name
UpdateInventory();
}
function GetMoney() {
return player.InventoryQuantity[iDollars.ID];
}
// main global script header
// Make functions usable in room scripts:
import function GiveMoney(int amount);
import function LoseMoney(int amount);
import function GetMoney();
GiveMoney(100);
if (GetMoney() < 100) {
Display("You don't have enough money!");
}
else {
LoseMoney(100);
player.AddInventory(iThing)
Display("You've bought the thing!");
}
Quote from: EvilTypeGuy on Fri 08/06/2007 20:46:08
No, since the engine can't really run "generically." Meaning, you pretty much have to have it run from the same directory as the game data at this point. Which in turn means that there isn't much point in packaging it.
Quote from: EvilTypeGuy on Fri 08/06/2007 20:46:08You cannot tell ags which file to use as the game file. It looks for ac2game.dat in the current directory.
Quote from: discord on Fri 18/05/2007 05:25:43Script link failed: Runtime error: unresolved import 'GetFlashlightMinLightLevel'
Quote from: Nostradamus on Thu 10/05/2007 09:05:47Buy the game (Amazon, sold-out.co.uk or ebay) and if you're having problems running it in Windows use VDMsound or Dosbox..
Quote from: Pumaman on Fri 04/05/2007 23:15:56Hmm yes, in 2.72 the GUI names have #defines created for them, but 2.8 doesn't do tihs any more. Would this be useful for people?
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.158 seconds with 15 queries.