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

#2901
General Discussion / Re: Isometric builder
Tue 17/08/2004 16:32:04
A useful little link from the tutorials thread:
http://www.zoggles.co.uk/asp/tutorials.asp?tut=1

With a little practice, isometric art is pretty easy, as Flippy said. I don't know about Paint, though, I prefer to be able to use layers.
#2902
From the manual:
game.skip_display
Setting for how Display() messages are skipped; valid values are same as for SetSkipSpeech (default 3).

Now, value 3 means "text does not time-out; player must click mouse or press key each time", so I'm not sure why it's vanishing straight away, unless it's been interfered with by something else or you're accidentally double clicking. Anyway, try this in on_game_start:

game.skip_display = 2;

It'll mean text can't be skipped at all, which might get a little annoying, but no more than not being able to read the game messages.
Hope this is of some use.
#2903
Or, just make more variables:

int my_counter;
int my_counter2;
int my_counter3;
... and so on, as many as you need. Or give them names that reflect the hotspot they're related to.


Edit: This may be exactly what Alynn said. Sorry.
#2904
Advanced Technical Forum / Re: Walking duck
Sat 14/08/2004 12:25:46
In the rooms rep_ex:

if (character[DUCK].walking  == 0) {
  MoveCharacterStraight (DUCK, Random (320), Random (240));
}

(Works for me, anyway)
The MoveCharacterStraight command means you can limit it to walkable areas (or, perhaps,  create a seperate area to be a pond). To have it wander the whole screen, replace it with MoveCharacterDirect.
#2905
Using scripting, it would be:

if (player.activeinv == 2) { //or whichever item you want
Ã,  // What you want to happen
}

else Display ("I can't use that here");

Using the interaction editor:

Conditional - If inventory item was used (2) //or whatever
Ã,  Ã,  What you want to happen
Ã,  Ã,  Stop running more commands
Game - Display a message (4) // or whatever

The key line being the 'Stop running more commands' inside the conditional. Hope this helps.

Edit: Either of these would be in the hotspots 'Use inventory with hotspot' interaction, obviously.
#2906
I think you'd use the character[CHARID].activeinv variable, so something like:

    if (character[GetPlayerCharacter()].activeinv == 1) {
      Display ("That doesn't need unlocking.");
    }
#2907
Darn, radiant replied while I was typing. Still:

I'm not sure which bit you're having the problem with, so here's a step-by-step. Feel free to ignore any bits you already understand.

1. If you haven't already, create the int door_is_open. Add this line to the room script (Ctrl-E or the {} button on the Room Settings panel):
      int door_is_open;

2. Again, if you haven't already, create the door object, and set its view.

3. Add this to the door object's 'Interact object' interaction:
      if (door_is_open == 0) {
        AnimateObjectEx (0, 0, 5, 0, 0, 1);
        door_is_open = 1;
      }
      else if (door_is_open == 1) {
        AnimateObjectEx (0, 0, 5, 0, 1, 1);
        door_is_open = 0;
      }

4. Test the game, you should have an opening and closing door.

Hope this helps.
#2908
Hmm, odd, worked for me. Try the slightly longer way:

if (door_is_open == 0) {
  AnimateObjectEx (0, 0, 5, 0, 0, 1);
  door_is_open = 1;
}
else if (door_is_open == 1) {
  AnimateObjectEx (0, 0, 5, 0, 1, 1);
  door_is_open = 0;
}
#2909
To make it use the hand cursor, you need to set the button to run script, and add this to the Inventory section of the interface_click script:

    if (button == 6) {
      SetCursorMode (MODE_TALK);
      SetMouseCursor (2);
    }

As I said, I think game.sierra_inv_color only affects the default GUI, not the one you're using. However, if I'm wrong, colour 0 is transparent, not black. Try game.sierra_inv_color = 16; instead, or import a background image for the GUI.

Glad you're got it mostly working now, though I'm interested - what did you have as the default inventory size, if not 40x22?
#2910
WhoIsMonkey@yahoo.com

I'm busy this afternoon, but hopefully I'll be able to get to it at some point this evening, if you want.
#2911
Isn't %d for ints, and %s for strings? So:

Ã,  string objectÃ, 
Ã,  InputBox("I would like", object);
Ã,  ParseText(object);
Ã,  DisplaySpeech (GANDALF, "I would like %s", object);

maybe? Do you even need the ParseText command here?
EDIT: Ah, so you do need the ParseText, after all. Cool.
#2912
But, that only works if the new font is a different size to the old one, which by default none of them are.

I think you have to import a new font at a larger size, then use that as the new font.
#2913
Is there any way you could upload your game somwhere for us to have a look at? As you've probably noticed, it can sometimes be difficult to give, and get, accurate advice about something you don't have in front of you.

Don't worry, though, you'll get it eventually.
#2914
Unless you've changed it, it is set to 40x22, and that seems to be what's casuing the problems (items overlapping, for example). I think the in-built inventory handles spacing differently to the GUI you're now using. So, I ask again, what size are your item sprites, and also what resolution are you using?

I think game.sierra_inv_color only affects the in-built inventory, but it's worth a shot.
#2915
1. Yes, there's a way to do that, but it's not actually that much simpler. Change the Hand buttons 'New mode number' from '8' to '3'. Now, put the commands you want to run in the Items 'Talk to inventory item' interaction.
  EDIT: And it's a little more difficult if you don't want the cursor to be the default 'Talk to' one.

2. I can't think of a simple way to fix this, other than importing a background for the GUI with the black box drawn on it.

3. Sounds like it is a problem with the InvDimentions, as I said. When you say "The size of the inventory sprites has not changed", what haven't they changed from? What size are the sprites you're using?

4. I have no idea why the GUI isn't working, sorry.
#2916
1. 'Graphical' variables refers to variables created using the interaction editor, rather than using scripting.

2. What Snarky said. Look up import and export in the manual for how to create global ints with useful names.
#2917
Where in the room script did you paste it?
You need to put it in the 'Player enters screen (before fadein)' section, of the rooms Interaction Editor (Ctrl-I, or the little red 'i' button).
#2918
1. 'other click on inventory' isn't in the GUI section, it's in the Inventory Items interactions.
     A. Open the item's interaction editor, and choose 'Other click on inventory item'.
     B. Chose 'Run Script', then 'Edit Script', then add the if (GetCursorMode() == 8 ) script.

2. Do you need to put anything in which brackets? If you mean the ones in GetCursorMode(), then no you don't. You will need to replace the line
    //whatever you want to happen
with the scripting for the interaction you want to run. For example:
   if (GetCursorMode() == 8 ) {
      RunDialog (1);
   }


3. The spacing may be due to the size of your inventory item sprites. What size are you using? By default, AGS spaces them based on a 40x22 pixle sprite. You may want to look into the SetInvDimentions command. I have no idea why the background colour changed. I don't think there is an other way to add the button you want, with out going through all this, but maybe a more experienced AGSer knows one.

4. I also can't think why this is, unless the button assignments have gotten messed up. Check that they're all set to 'Run Script' - except the Hand button, which should be set to 'Set cursor mode' - and check the object numbers against against the inventory script:

  if (interface == INVENTORY) {
    // They clicked a button on the Inventory GUI
   
    if (button == 1) {
      // They pressed SELECT, so switch to the Get cursor
      SetCursorMode (MODE_USE);
      // But, override the appearance to look like the arrow
      SetMouseCursor (6);
    }
   
    if (button == 2) {
      // They pressed LOOK, so switch to that mode
      SetActiveInventory(-1);
      SetCursorMode(MODE_LOOK); 
    }
    if (button == 3) {
      // They pressed the OK button, close the GUI
      GUIOff (INVENTORY);
      SetDefaultCursor();
    }

    if ((button == 4) && (game.top_inv_item < game.num_inv_items - game.num_inv_displayed)) {
      // scroll down
      game.top_inv_item = game.top_inv_item + game.items_per_line;
    }
    if ((button == 5) && (game.top_inv_item > 0)){
      // scroll up
      game.top_inv_item = game.top_inv_item - game.items_per_line;
    }


I've been meaning to ask - why do you want / need the extra button? Depending on what you want to acheive, there might be an easier way to go about it.

Don't worry, we'll get there eventually!
#2919
Either :
On the GUI panel, delete the STATUSLINE GUI.

Or:
In the game_start section of the global script, add the line
GUIOff (STATUSLINE);

EDIT: I'd recommend the GUIOff option, as it's easier to turn it back on if you change your mind.
#2920
if (door_is_open == 0) {
  AnimateObjectEx (0, 0, 5, 0, 0, 1);
  door_is_open = 1;
}
else {
  AnimateObjectEx (0, 0, 5, 0, 1, 1);
  door_is_open = 0
}

As it was, the value of door_is_open never changed, so the close door animation would never run. Also, make sure door_is_open is a valid variable.
SMF spam blocked by CleanTalk