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 - Ashen

#2681
Well that was unexpected. Um, I mean..

Arr! Thank'ee Cap'n. I'll be startin' it just as soon as I be gettin' out the crow's nest. Yarr!

Or something like that. Thank you, anyway.
#2682
If you don't like reading other people's code, you'll hate this one.....

(Adapted from jetlag's code)
Code: ags

Ã,  int seq = 0; // or whatever you want the lowest 'SP000x' to be
Ã,  string filename;
Ã,  StrFormat (filename, "SP%04d.pcx", seq); // Format the filename as you wanted - 'SP000x.pcx'.
Ã,  int filecheck = FileOpen(filename,FILE_READ);
Ã,  while (filecheck != 0){
Ã,  Ã,  Ã, FileClose(filecheck);Ã,  Ã,  
Ã,  Ã,  Ã, seq ++;
Ã,  Ã,  Ã, StrFormat (filename, "SP%04d.pcx", seq);
Ã,  Ã,  Ã, filecheck = FileOpen(filename,FILE_READ);
Ã,  Ã,  Ã, // File name exists, so add one and try again....
Ã,  Ã,  Ã, // Repeat until filename doesn't exist....
Ã,  }
Ã,  SaveScreenShot (filename); // then, save with that filename.


Is this more what you want? I'm sure there's a more streamlined way, but this one works for me.

EDIT: Just noticed that if you have, for example, SP000.pcx, SP001.pcx, SP002.pcx, SP003.pcx then you delete SP001.pcx, the next screenshot you take will fill that gap, rather than becoming SP004.pcx (if that makes any sense). Does that work for or against point 2 in the original post?
#2684
I, however, am not. I think you want this here thread.

There hasn't been one made yet -  the biggest problem would be handling item dropping in AGS - but, well, read the thread and see.
#2685
AnimateCharacter is non-blocking, so ReleaseCharacteView is called before the animatin has a chance to run. Without the ReleaseCharacterView, the animation will keep running because the last parameter of AnimateCharacter is 'repeat'.

Try using AnimateCharacterEx (which has a blocking parameter) or, as shown in the manual (but doesn't seem to work for me):
Code: ags

SetCharacterView(0,3);
AnimateCharacter(0,2,3,0);
while(character[0].animating) Wait(1);
ReleaseCharacterView(0);


If you actually want the animation to run more than once, I think you have to put the line in more than once, but I'm not sure about that.
#2686
Just Google for 'Download Counter'.

Some of them you have to pay for, some are only for one file, but there should be one that'll work for you. Don't know ifany are PHP, though, didn't look that hard.
#2687
Well, you'll need to have a label on the GUI, and update all the SetLabelText(0,0.....); lines, e.g.:

Code: ags

if (GetCursorMode()==0) SetLabelText(GUI6,0,"Walk to @OVERHOTSPOT@");
  if (GetCursorMode()==1) SetLabelText(GUI6,0,"Look at @OVERHOTSPOT@");
  if (GetCursorMode()==2) SetLabelText(GUI6,0,"Interact with @OVERHOTSPOT@");
  if (GetCursorMode()==3) SetLabelText(GUI6,0,"Talk to @OVERHOTSPOT@");
  if (GetCursorMode()==4) {
    string usinginv;
    string useinvtxt;
    StrCopy (useinvtxt, "Use ");
    GetInvName(character[GetPlayerCharacter()].activeinv,usinginv);
    StrCat (useinvtxt,usinginv);
    StrCat (useinvtxt," with ");
    StrCat (useinvtxt,"@OVERHOTSPOT@");
    SetLabelText(GUI6,0,useinvtxt);

(Assuming the label is still object 0 on GUI6)
#2688
On line 58 which, if I counted right, is in the rep_ex. Looking at it, you have the closing brace for the section, then the statusline code:

#sectionstart repeatedly_executeÃ,  // DO NOT EDIT OR REMOVE THIS LINE
function repeatedly_execute() {
Ã,  // put anything you want to happen every game cycle here
} // This brace is the problem, take it out.

if (GetCursorMode()==0) SetLabelText(0,0,"Walk to @OVERHOTSPOT@"); // this was line 58
Ã,  if (GetCursorMode()==1) SetLabelText(0,0,"Look at @OVERHOTSPOT@");
Ã,  if (GetCursorMode()==2) SetLabelText(0,0,"Interact with @OVERHOTSPOT@");
Ã,  if (GetCursorMode()==3) SetLabelText(0,0,"Talk to @OVERHOTSPOT@");
Ã,  if (GetCursorMode()==4) {
Ã,  Ã,  string usinginv;
Ã,  Ã,  string useinvtxt;
Ã,  Ã,  StrCopy (useinvtxt, "Use ");
Ã,  Ã,  GetInvName(character[GetPlayerCharacter()].activeinv,usinginv);
Ã,  Ã,  StrCat (useinvtxt,usinginv);
Ã,  Ã,  StrCat (useinvtxt," with ");
Ã,  Ã,  StrCat (useinvtxt,"@OVERHOTSPOT@");
Ã,  Ã,  SetLabelText(0,0,useinvtxt);
}
#sectionend repeatedly_executeÃ,  // DO NOT EDIT OR REMOVE THIS LINE

Try that and see.

Edited: Sorry, I didn't even check the ;'s, since that was mentioned in the other thread.
#2689
According to the manual:

320x200, 256-colour: Any Pentium-class system
640x400, 256-colour: 266 Mhz or above
800x600, 256-colour: 500 Mhz or above recommended
320x200, 16-bit colour: 233 Mhz or above
640x400, 16-bit colour: 500 Mhz system minimum, may need faster if you use large objects
800x600, 16-bit colour: 600 Mhz system minimum, may need faster if you use large objects
320x200, 32-bit colour: 300 Mhz or above
640x400, 32-bit colour: 700 Mhz system minimum, may need faster if you use large objects
800x600, 32-bit colour: 900 Mhz system minimum, may need faster if you use large objects

I think these are approximate, and can change based on what else is running, number and size of sprites on screen, etc. Basicly, if you use the highest setting, it shouldn't be a problem for most users, but put some thought into whether you really need to.
#2690
There's this thread from a while ago:
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=9963.0

Might be useful.
#2691
I think the player thing is set when the game starts, and isn't updated when/if you change characters, so, yeah, that might be the problem.

Try using this instead:
Code: ags

GetInvName (character[GetPlayerCharacter()].activeinv, buffer); 
#2692
Just to add to what strazer said:
It doesn't matter what colour you actually use, AGS just takes the first 16 (or 30, or however many of whatever area you're mapping (walkable, hotspot, etc) the version you're using allows) pallete slots and maps the area onto them. If you can (depends on the program you use), try decreasing the colour depth of your map to the absolute minimum of colours you need, then re-save it at 256 and see if that helps. (I find this usefull for getting the colours I've used into the first few slots). Also, keep in mind that slot 0 will be the empty space on screen, not Hotspot 1.

EDIT: Sorry, I have no idea why I was talking about hotspots, when the question was about walkable areas, except maybe that I work on hotspots more than walkable areas.
#2693
First off, I have no idea about the inventory thing, sorry.

Secondly, I don't know if I fully understand your other problem, but:
1) The code you've got now would only send the character to room 1 if they'd never been there ( if (HasPlayerBeenInRoom(1)==0)) which would never be the case if they've come from room 1 in the first place, which is probably why it doesn't work.

2)
QuoteBasically whatever room I am in I would like to go back to the room I came from.
Is the character[CHARID].prevroom variable what you're after? It stores the last room the character was in, so:
Code: ags

NewRoomEx (character[EGO].prevroom, 100, 100);

would send them to room 1 if that was where they came from, to room 2 if that was, to room 27 if that was, etc.
#2694
Critics' Lounge / Re: RPGish character
Thu 06/01/2005 15:09:42
I think the new shoulders actually make him look fatter - being narrower, they emphasise the broadness of the waist more. Changing the waistcoat-thing helped, in the original it looked like it was being pushed to the sides by his immense gut. If you want to make him look thinner, try making him thinner - trim a pixel off the legs (the left one at least), and maybe the arms too. I know there's not many pixels there to start with, but I think it'd work.

Also - and this might just be me - the pure black for the eyes (the pupil & iris, not the brow) makes him look a little angry, which might be aging him a little. Try changing the top one to a colour, and see what that does.

Here's my edit, to show what I mean (I also gave him a strange, feathered hat, just to fill space):
#2695
I don't know if you've seen it, but I just remembered seeing this tutorial a while ago:
http://www.worth1000.com/tutorial.asp?sid=161051

It uses photographs, but I imagine you could adapt it to drawn backgrounds. I haven't been able to try it out though, as I don't have any 3D glasses. I'm also not sure how it'd work with scrolling backgrounds - probably not well if at all.

Might not be of use, but I thought I'd mention it.
#2696
SetFrameSound (int view, int loop, int frame, int sound);

Any use?
#2697
Yup, and also one on the next line.
#2698
Try:
1) Create an int in the Room Script, called 'this'
Code: ags

// room script file
int this;

The name isn't important, of course, as long as you use the same one in the next bit.

2) Add this to the room's Repeatedly_Execute:
Code: ags

if ((GetHotspotAt (mouse.x, mouse.y) == 2) && (IsOverlayValid (this) == 0)) this = CreateTextOverlay (50,80,120,2,15,"This is the book you need."); 
else if ((IsOverlayValid (this) == 1) && (GetHotspotAt (mouse.x, mouse.y) != 2)) RemoveOverlay (this);

Making sure that the Hotspot in the GetHotspotAt commands is the right one, and changing the CreateTextOverlay values (x, y, font, etc) to suit.

Of course, if you've got a statusline GUI already, there's probably a simpler way.
#2699
I gave it a little longer  to see if there'd be any more votes , and there were. Unfortunately, it's still a tie, so I'll cast the deciding vote.
I enjoyed the adventure game logic behind Staston's needessly-complicated-way-to-do-a-simple-thing approach, and Monty Python references always score bonus points with me. In a free vote, I'd probably have plummed for Einoo since I like it when things get blowed up, but this is a deciding vote, so sadly I can't.

So, it's a tough call, but the winner is:
DragonRose.

One word of advice (for what it's worth): Leave it until after Christmas, maybe even the new year, when people mightn't be as busy with their real lives, and you might get a few more entrants. Also, it gives you longer to come up with a nice setup.
Also also, I'll be back from my holidays and able to enter, but that's neither here nor there..

So, congratulation to DragonRose, and a Merry Christmas to all.
Have some toffee (I made it myself).
#2700
OK, I'm going to give it a little while longer (about an hour from the timestamp on this post), then I'm going to declare voting open.
EDIT:
OK, Voting is now offically open, I'll give it until about this time tomorrow, unless no-one's voted by then. I'm not voting, unless there's a tie. Oh, and if anyone missed it - Einoo is a member now, so it's alright to vote for him (It would've been OK if he'd still been a guest, of course, but I don't know if he could've started the next one then).
SMF spam blocked by CleanTalk