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

#2481
Well, Ishmael did say (in the other thread) he wasn't too sure of the parameters, and to look them up in the manual. If you'd done that, you'd have seen it should be InputBox ("What's your name?", plrname);, rather than the other way round, which might be a start.
#2482
Yes, that's the InputBox code.
As to where you put it - it depends. Where ever you want to give the player a chance to set their name. It could be in a dialog, in the First time player enters screen of the first room, when they click on an object .... It may even be better to use a custom TextBox GUI, depending on your game.
Not much help, I know, sorry, but it's difficult to be specific without knowing when & how you want the player to supply their name.

EDIT: Since the BFAQ's back up, I'll point out this question about placing code, and this one about changing the player character name.

EDITED AGAIN: with more useful BFAQ link.
#2483
Which bit are you having trouble with?

All of the character names, set in the editor, are stored in strings like character[CHARID].name, e.g. character[EGO].name is 'Roger', for the player character.
All you need to do is prompt the player to input a name (with an InputBox () command like in the other thread, or a TextBox GUI), and save that input to the character[EGO].name string. Then instead of, for example:
Code: ags

DisplaySpeech (EGO, "Hello! I'm Roger.");

You'd use:
Code: ags

DisplaySpeech (EGO, "Hello! I'm %s.", character[EGO].name);
#2484
For the built-in AGS fonts, you can use StrSetChatAt () to see what characters acsii codes generate.
I.e.:
Code: ags

int charpos;
string disp;
while (charpos < 31) {
  StrFormat (disp, " ");
  StrSetCharAt (disp, 0, charpos);
  string pos;
  StrFormat (pos, " %d", charpos);
  StrCat (disp, pos);
  Display (disp);
  charpos ++;
}

31-128 are just the standard characters shown on the 'Fonts' window, so it's 1 - 30 that're the 'hidden' chars. Over 128 seems to be 'special' characters and keypresses that can't be displayed without crashing.
#2485
Advanced Technical Forum / Re: GetInventory
Wed 20/04/2005 20:48:32
It does do it in the beta, yes.

However, if you've used 2.62 and don't want to re-write all your code, you could maybe use GetInvAt (x, y) and fill in the co-ords of the inventory window.
#2486
General Discussion / Re: Posting pictures
Sun 17/04/2005 02:56:05
The image needs to be on-line somewhere, if that's what you mean.

EDIT:
As mentioned in this thread, also started by you, albeit some time ago.
#2487
I think your last question was a bit vague, which is why no-one answered. Read the GUI section of the BFAQ, and maybe Darth mandarbs Custom Inventory thread, for some pointers, then ask back if there's something specific you don't undersatnd.

1. To stop it appearing on start up, got to the GUI window, and set the 'Visible' property to 'Popup Modal'. OR, leave it set to 'Normal', and add a GUIOff() command to the game_start function, or in the Player enters screen (before fade-in) of the first room. Then, you'll need to have something (e.g. akey press, or a button on another GUI) that turns it on when you want it.

2. You probably need to set up the interactions for the different modes for each inventory item, on the Inventory' window of the editor. By default, 'Use'ing the item will set it as active, and changes the cursor graphic to reflect that.
#2488
NOTE: First paragraph made pointless, by TerranRich posting:
Reading TerranRich's post, I think Damage refers to a temporary cap on your health - you still have the same absolute maximum, but you can't reach it until you get rid of the Damage. An example might be, if you get into an accident, break a leg and get some cuts and bruises. You'd be able to heal the little things easily enough just with time, you won't be at your best until the leg is properly set (increase your health, but not reach 100%).


If I've got that right, it might be better to have Damage as a negative value, representing the handicap to your score, i.e. a -25% Damage means you can only reach 75% health, until you get yourself seen to (if you haven't already done this - it's hard to tell since you used 50% in your example.)

It might also be an idea to show this graphicaly on the health bar as well - grey out the appropriate percentage, perhaps.

EDIT: I also like the idea of the analogue clock being a sort of 'body clock' to monitor tiredness, hunger, etc. I think, provided you explain it all a bit more fully in the manual, it's a nice, workable GUI. Made sense to me, anyway.
#2489
Try moving the declaration (int over1;) out of rep_ex, to the top of the room script.

I think the problem is, since it's currently re-declared every loop, over1 is no longer associated with the graphic overlay, so RemoveOverlay(over1); doesn't do anything.

Also, you should be able to use IsOverlayValid(over1), instead of the GlobalInt, e.g.:
Code: ags

if(GetHotspotAt(mouse.x,mouse.y) == 1) {
  if(IsOverlayValid(over1) == 0)  over1 = CreateGraphicOverlay(40,119,54,1);
}
#2490
General Discussion / Re: Who said That !?
Sat 16/04/2005 15:34:24
Does Goldmund's answer stand, then? OK, he named the original source, but that wasn't what Fmarais meant, was it?
(Not that I have a clue what either of them are from, anyway)
#2491
General Discussion / Re: Breaking the Barrier
Sat 16/04/2005 15:31:18
Quote from: Fmaraisactually finish your life long game idea

That's my excuse right there - I don't have an idea, and I don't want to rush to start working on every little thing that pop in to my head. (If I did, there'd be a least a dozen more abandoned projects in GiP.)
So, I guess:

6) "I want to make a game, but don't have a story.

As to what'll break that down, I wish I knew. I have a years-long case of writers block here.
#2492
Little late, but you could also use:
Code: ags

string buffer;
if (GetSaveSlotDescription(SLOT,buffer) == 0) { // i.e. Slot doesn't exist
  // SetButtonPic, or whatever
}
else {// Slot exists
  // Whatever
}


Or (maybe more direct use, if you've selected 'Save Screenshots in save game'):
Code: ags

int sprite = LoadSaveSlotScreenshot(SLOT, 50, 50);
if (sprite > 0) { // i.e. if Slot existed
  SetButtonPic(GUI, BUTTON, 1, sprite);
}
else SetButtonPic (GUI, BUTTON, 1, BLANKPIC);
#2493
Looks like there's an error with the lines:
(character[CPC].room == character[GetPlayerCharacter()].room))
(character[CPD].room == character[GetPlayerCharacter()].room) &&

I think it should be:
(character[CPC].room == character[GetPlayerCharacter()].room) &&
(character[CPD].room == character[GetPlayerCharacter()].room))

(Unless that's just how you typed it here, and not how it is in the script.)
Apart from that - what error messages are you getting?
#2495
Quote from: The Manual
SetFrameSound
SetFrameSound (int view, int loop, int frame, int sound)

Sets FRAME of LOOP in VIEW to have SOUND as its sound setting. This modifies the sound setting originally available in the Views mode of the editor, and allows you to adjust, add and remove sounds at runtime.
Pass SOUND as 0 to disable the sound for this frame.

Example:

SetFrameSound (5, 1, 3, 0);

disables the sound from view 5, loop 1, frame 3.
Should answer the second question.

I'm not sure what the first thing was. Seemed more like a statement, than a question.
#2496
General Discussion / Re: What's your solution?
Fri 15/04/2005 11:52:48
Quote from: Einoo on Fri 15/04/2005 03:02:47
Quote from: Ashen on Fri 15/04/2005 00:03:26
'Fabreeze' is really only the solution to not smelling of Fabreeze.

Actually, it was a reference to 8-Bit Theater, a great webcomic that's been around for a virtual eternity.

Ah, right, sorry. What I said about Fabreze remain true, though (if misspelt).
#2497
General Discussion / Re: What's your solution?
Fri 15/04/2005 00:03:26
'42' is the Ultimate Answer to Life, The Universe and Everything*.
'Fabreze' is really only the solution to not smelling of Fabreze.
Procrastination isn't a solution at all. It's just so much easier than actually finding one.
'7% solution' is a Sherlock Holmes reference.
'Always know where your towel is' is another Hitchhikers Guide reference. I have no idea why I included it, except I thought Einoo would get it, and they were my parting words to a friend who's moved to Oz. (They were usefull, too - he realised he hadn't packed one.)

If you meant you don't get the point of the thread - nor do I, I just felt I had to make the Holmes joke before it got locked. Sorry.


* I believe the Ultimate Question is "What do you get if you multiply six by seven?"
#2498
General Discussion / Re: What's your solution?
Thu 14/04/2005 23:08:34
7%


Also, always knowing where my towel is.
#2499
Quote from: The ManualIMPORTANT: This command does not change the room immediately; instead, it will perform the actual room change once your script function has finished (This is to avoid problems with unloading the script while it is still running). This means that you should not use any other commands which rely on the new room (object positionings, and so on) after this command within the same function.

So, try putting everything after the ChangeRoom command in the after fade-in for the new room.
#2500
Does it make any difference if you disable the textboxes, when you turn their GUI's off? (e.g if (TxtBoxOne.OwningGUI.Visible == 0) TxtBoxOne.Enabled = 0;)
It could be that the first one is blocking the others, despite being invisible.
SMF spam blocked by CleanTalk