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

#2581
Quote from: Ashen on Mon 21/03/2005 01:04:16
You may want to hide the border, as well.
See, I thought of that, I just didn't explain it very well.
The last option for the Textbox is 'Hide Border: No'.  Change that to 'Hide Border: Yes' to, well, hide the border
#2582
General Discussion / Re: Forum message count
Mon 21/03/2005 01:08:41
* Ashen has, and now has -1 messages.
* Ashen is a little bothered by that, for reasons he can't describe.
#2583
1.
Turn off the options GUI (called START) by setting it's 'Visiblity' property to 'popup modal', and add scripting to do what you want:
Code: ags

function on_key_press (int keycode) {
  NewRoom (2); // or whatever your first room is
  ClaimEvent();
}

Add that somewhere at the top of the title screen's room script, and any keyboard press will take you to room 2, where the game starts.

2.
To clear the period, go to the GUI window, select the PARSER GUI, and clear the text (">>") from object 0 (a label). You could also delete the object, but then you'd have to update a lot of script, so it's easier to just clear the text.

To change the colour of the display, first select the textbox object (object 1) and change the text colour to what you want (white = 15). You may want to hide the border, as well. Then, deselect the textbox, and change the GUI's background colour (black = 16). That should be it - look up GUIs in the manual for move details on editing/creating them.
#2584
Beginners' Technical Questions / Re: messages
Mon 21/03/2005 00:36:51
You mean a Statusline, like in this thread?
#2585
General Discussion / Re: Free Music
Sun 20/03/2005 18:12:24
Quote from: Mr. FlibbleMusic is just as important as graphics when making a game, so why is it that people never want to make their own music?
Yes, but the importance of graphics is obvious - they're onscreen in front of you the whole time you're playing, but the music - if it's doing it's job right - you shouldn't really be that aware of  in-game (with the exception of the main theme, of course). So, it might be seen more as a 'bonus' to be included if there's time, or you can find someone else to take care of it, but not actaully that important. I'm not saying that's true, just that I can see the thinking - it's a lot more obvious when a game/TV show/film doesn't have ambient music, than when it does (to me at least).

('ambient' mightn't be the best word here, but I don't know what is. Background? Incidental?)

Another thing (speaking from experience) is that while, yes, you can learn how to make your own music, if you're also learning how to draw decent backgrounds, characters, animations, etc (or, in my case, learning to draw something that looks even vaguely like it's meant to), having another thing to learn is a little daunting (pretty much what MrC said above). Especially if you couple that with the thinking that you really only need a 'theme tune', so it's not worth going to the trouble.
#2586
Well, since you've just set the timer running, it's not going to be expired when you enter the room.
You need to move this part:
Code: ags

if (IsTimerExpired(1)==1)
    {MoveObject(1,319,75,4);} 

into the repeatedly_execute script for the room.
#2587
I thought 'Sloop John B' as well, but couldn't remember what it was actaully called. It also reminds me a little of 'I am a Cider Drinker' (or 'Una Paloma Blanca', if you prefer), but that might be a caffine-induced delusion.
#2588
Do you mean the 'text box' GUI object?
AFAIK, they're always transparent, so you have to change the background image of the GUI it's on to have the colour you want, where you want it. Or, create a non-clickable button, set its image to a block of the colour you want, and place it 'behind' the text box.

If you meant the white box that pops up on Display() commands, I think you have to use a custom Text Window GUI.
#2589
Heh, I'm so used to playing around with scripting, I didn't even think about doing it that way. Does that change the skip Display settings as well, or do you not need that?
#2590
Yes, change it to GetHotspotName (GetHotspotAt(mouse.x,  mouse.y),  name).
Sorry, I typed it on the fly, then corrected it in AGS, but forgot to change my post.  Can't believe I didn't spot that.

Also, characters would be handled by a different bit of the unhandled_event script anyway, wouldn't they? So you could set that up however you wanted. E.g.
Code: ags

if (what == 3 ) { // Characters
  if (type == 0) { /Look at 
    DisplaySpeech (EGO, That person is called %s.", character[GetCharacterAt(mouse.x, mouse.y)].name);
  }
}


But, yeah, for individual hotspots (and objects, inventory items, etc) ending in 's', you'd probably have to script the response manually.
#2591
Well, the first thing I can see is this:
Code: ags

if (strDescription=="a") Display("You need to type in a name before you save.");


You can't, AFAIK, compare strings using '=='. (In fact, I thought it returned an error on saving.) Does it work if you try:
Code: ags

if (StrComp ("", strDescription) == 0) Display("You need to type in a name before you save.");
#2592
There's StrLen() and StrGetCharAt(). So:

Code: ags

if (what == 1) {//Hotspot
  if (type == 1) { // Look at
    string name;
    GetHotspotName (GetHotspotAt(mouse.x,  mouse.y),  name);
    int str = StrLen (name); // first letter = 0, last = length-1
    if (StrGetCharAt (name, str-1) == 's') DisplaySpeech (EGO, "It's some %s.", name) ; // Last letter is S
    else if (StrGetCharAt (name, 0) == 'a'|| StrGetCharAt (name, 0) == 'e' || StrGetCharAt (name, 0) == 'i' || StrGetCharAt (name, 0) == 'o' || StrGetCharAt (name, 0) == 'u') DisplaySpeech (EGO, "It's an %s.",  name); // First letter is a vowel
    else DisplaySpeech(EGO, "That's a %s.",  name);

  }
}


There might be a simlper way than that long if (a or e or i or o or U) line, though.

EDIT: Corrected GetHotspotName (mouse.x,  mouse.y,  name); to GetHotspotName (GetHotspotAt(mouse.x,  mouse.y),  name);
#2593
I think the problem is that, by default, pressing a key (or, in this case, a key already being pressed) skips Display/DisplaySpeech() commands, hence the message vanishing more or less as soon as it appears.
If this is the problem, you'll probably need to play with the SetSkipSpeech () command, and the game.skip_display variable. Look them up in the manual for more details.
#2594
1. Read the BFAQ:
20. I want to have multiple characters in my game that the player can play as. Is this possible? And if so, how would I go about doing such a thing?

2. Not with the Interaction Editor, as far as I know, but you can change it in-game using the SetCharacterSpeechView (CHARID, view); script command (or character[CHARID].SpeechView = view; in the new versions).
#2595
What resolution is your game?
I think SetInvDimentions () uses 320x2*0 resolution, regardless of what it's actually set to. So, you might have to use SetInvDimentions (38,38) to get them showing properly. Also, IIRC, if the inventory items are set larger than the Inventory window on the GUI (which also uses 320x2*0 res) they don't show up.
#2596
Code: ags

if (what == 1) {//Hotspot
  if (type == 1) { // Look at
    string name;
    GetHotspotName (GetHotspotAt(mouse.x,  mouse.y),  name); 
    DisplaySpeech(EGO, "That's a %s.",  name);
  }
}

Or
Code: ags

if (what == 1) {//Hotspot
  if (type == 1) { // Look at
    string name;
    Hotspot *theHot = Hotspot.GetAtScreenXY(mouse.x, mouse.y);
    theHot.GetName (name);
    cEgo.Say ("It's a %s.", name);
  }
}


Depending on how the rest of your game works, it might be better to add the a/an/some to the hotspot name ('a monkey', 'an apple', 'some wires' instead of 'monkey', 'apple', 'wires') rather than the display command ("That's %s.", not "That's a %s."), so you don't get things like "It's a wires" or "It's a apple."

EDIT: Corrected GetHotspotName (mouse.x,  mouse.y,  name); to GetHotspotName (GetHotspotAt(mouse.x,  mouse.y),  name);
#2597
Do you mean unhandled_event?

Explained better in the manual, or by strazer here.
#2598
Beginners' Technical Questions / Re: Shooters
Fri 18/03/2005 11:23:41
Short answer - it depends.
Here is a discussion about shooters in AGS, here is Ponch's 'bare bones' shooter code, as used in this game.

There are other examples out there (just do a search for 'AGS Shooter' or something similar) but these were the first I thought of, since this question was just asked about a month ago here.

#2599
Have you declared 'paint' as a global variable? I don't think dialog_request recognises room variables.
#2600
(Ishmael posted while I was typing, but I'll post this anyway)
Or, to have NPC walking a path, you use MoveCharacterPath () (or Character[CHARID].AddWaypoint in new scripting). So, you'd have something like this, in repeatedly_execute (the comment-ed script is the new way, in case you're using 2.7):
Code: ags

if (character[NPC].walking == 0) { // if (cNPC.Moving == 0) {
  MoveCharater (NPC, X1, Y1);        // cNPC.Walk (X1, Y1);
  MoveCharacterPath (NPC, X2, Y2);   // cNPC.AddWaypoint (X2, Y2);
  MoveCharacterPath (NPC, X3, Y3);   // cNPC.AddWaypoint (X3, Y3);
  // And so on
}


This has been asked before, so a search should turn up more detailed answers and a few different options, if you want/need them.

As Ishmael said, when you start talking to NPC (if you use a dialog, at least) the game is technically paused - the rep_ex isn't run, so NPC should stop moving to talk to you. If it doesn't work, you could use a variable to check whether NPC should be moving or not, e.g.:
Code: ags

if (character[NPC].walking == 0 && talknpc == 0) { // if (cNPC.Moving == 0 && talknpc == 0) {

Then, change the variable when talking:
Code: ags

talknpc = 1;
DisplaySpeech (EGO, "Can I talk to you for a minute?");  // cEgo.Say ("Can I talk to you for a minute?");
DisplaySpeech (NPC, "Sure!");                            // cNpc.Say ("Sure!");
DisplaySpeech (EGO, "...");                              // cEgo.Say ("...");
DisplaySpeech (EGO, "Thanks!");                          // cEgo.Say ("Thanks!");
talknpc = 0;
SMF spam blocked by CleanTalk