Menu

Show posts

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 Menu

Messages - strazer

#61
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?
#62
Quote 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.

Works great, thank you so much! Great game!

Edit:

Btw, small bug: If you close the door from the inside, you can still walk through it.
#63
This looks very interesting.
Do you use the flashlight plugin for the sniper scope? Have you tried using a graphic overlay instead?
I'm interested in a plugin-free version because neither the Linux nor the Mac versions of AGS support them.
#64
If you use a GlobalInt to store the amount of money you have, you can simply set the GUI label's text to @GIx@ where x is the number of the GlobalInt, for example: @GI7@

Guess where you can find out how to use GlobalInts? ;)
#65
General Discussion / Re: London 2012 logo
Sun 17/06/2007 13:27:01
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.

could have = could've != could of

Sorry, it's a common mistake but I had to point it out.

And yes, the logo is horrible.
#66
There are many ways, but you could use an inventory item like this:

1.) Create an inventory item called Dollars. Its script-o-name will be iDollars.

2.) Creating custom functions:

Code: ags

// 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];
}


Code: ags

// main global script header

// Make functions usable in room scripts:
import function GiveMoney(int amount);
import function LoseMoney(int amount);
import function GetMoney();


3.) Using the functions:

Code: ags

  GiveMoney(100);


Code: ags

  if (GetMoney() < 100) {
    Display("You don't have enough money!");
  }
  else {
    LoseMoney(100);
    player.AddInventory(iThing)
    Display("You've bought the thing!");
  }


(Untested)
#67
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.

Are you sure? I put the AGS files into /usr/local/bin and usually run games like this:
  $ cd /usr/local/games/ags/6das
  $ ags 6das.exe
Works like a charm.
A problem is savegame compatibility, so you have to remember to always play the game with the same AGS version. That's why I have several AGS versions in /usr/local/bin, named ags262, ags271 and so on.
#68
It has indeed been suggested before: Tracker entry
#69
The script language has changed since my last answer.
The function is no longer stand-alone, no longer requiring you to specify both characters as parameter.
Instead, the function is now part of one character and needs you to specify the character to follow (or not).

So instead of
  FollowCharacter(AI3, EGO);
do
  cAi3.FollowCharacter(null); // tell cAi3 to follow noone

The function has other, optional parameters which is why you didn't get a compile error with the -1.

Please check the manual first on how to use the new functions to avoid these kinds of problems in the future.
#70
What do you mean? What exactly is the problem you're having?
#71
(In reply to SinSin):

I thought the whole purpose of using Flash in AGS was to get the filesize down. Exporting the animation to a video that AGS can play will take up a lot more space.
#72
People, please, re-read each other's posts and try to imagine the other person not trying to be rude to you. Don't be touchy, I'm sure there's just a smiley missing here and there.

Anyway, personal attacks end here!

/moderator
#73
Yes, this game uses the flashlight plugin which is why it doesn't work with the Linux engine because that doesn't support plugins. So the only way to run it would be in Wine (or a VM obviously).

Quote from: discord on Fri 18/05/2007 05:25:43Script link failed: Runtime error: unresolved import 'GetFlashlightMinLightLevel'

First, make sure the plugin file AGSflashlight.dll is in the game directory.

If it is, maybe it can't find the plugin dll because Wine is operating out of a different working directory (I had that happen with a few other games before). Try opening a terminal window, then change to the game's directory (for example):
  $ cd /home/discord/mmd
then run Wine from there:
  $ wine Maniac.exe
#75
Do you use this code in the game_start function?
If so, it is a known bug that System.ViewportHeight returns a height of 200 instead of 240 pixels there.
If you're coding a module, you could put the code in the on_event function instead.
#76
General Discussion / Re: DAfont.com
Thu 10/05/2007 22:38:07
"Free" as in free-to-download? Wow. Wake me when there's a website that only lists free-to-USE fonts!
#77
General Discussion / Re: Broken Sword Remakes
Thu 10/05/2007 12:40:04
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..

Broken Sword 1 & 2 are also supported by ScummVM.
#78
Please post the exact error messages you get so we can help you better.

I've never heard of the problems you mention so it's most certainly an issue with your computer. Therefore I'm moving this to the General Discussion forum so that more people can see this and offer their advice.
#79
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?

Unless there's another way to check for the existence of a GUI, I think module authors need this to present an error message using ifdef if the GUI belonging to the module is missing. That's what I would do, anyway.
#80
You have to adjust your monitor. It saves picture settings for different resolutions.
SMF spam blocked by CleanTalk