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

#2921
You didn't have to make any changes in the if (interface == ICONBAR) part of the script.

The code I posted is further up the global script, it's a function that tells AGS whether to use the in-built inventory window, or the INVENTORY GUI. So, in what you pasted, change:

Ã,  Ã,  if (button == 4) {Ã,  // show inventory
Ã,  Ã,  Ã,  function show_inventory_window () {
Ã,  GUIOn (INVENTORY);Ã, 
Ã,  // switch to the Use cursor (to select items with)
Ã,  SetCursorMode (MODE_USE);
Ã,  // But, override the appearance to look like the arrow
Ã,  SetMouseCursor (6);
Ã,  Ã,  }

back to

Ã,  Ã,  if (button == 4) {Ã,  // show inventory
Ã,  Ã,  Ã,  show_inventory_window ()
Ã,  Ã,  }

and make the changes to the function script - it starts around line 17 of the global script, and should look exactly as I showed, since I just copy & pasted it. Sorry if I was unclear in my last post, hopefully it makes more sense this time.

#2922
Critics' Lounge / Re: Whats needed here?
Wed 04/08/2004 21:38:40
To me, the first one looks a little lifeless, a bit too clean. It looks like a 3D render - a good one I have to say, but just a little plastic-y. Maybe take the flags out of the image, and make them animated objects? Also, you could do the same for the drawbridge - have it raise and lower, rather than just hover there. Finally, the mountain could use some texturing.

The second one is just far too empty at the moment. Add details - A farmer in the field, a small market, some castles even had small villages grow up around them (I think, they do in books, anyway), even just some trees like sedriss said. Or, unless there's a reason for it, you might want to drop it completely, rather than put a lot of effort into a BG you don't actually need.

Then again, they look fine as they are, and I couldn't produce anything like them, so feel free to ignore everything I said.
#2923
Not with hotspots, no.

However, you can use Regions - just put your room change command in the 'Player Walks onto region' interaction - or you could use the screen edges (the yellow lines on the Room editor page). Personally, I prefer Regions, as you get more control.


As to limits, they're in the manual:

15000  imported sprites
240  sprites per folder
400  views
16  loops per view
20  frames in each loop
(There are more on the 'System Limits' page, in the Refernece section.)
#2924
Critics' Lounge / Re: The Laughing Knight!
Wed 04/08/2004 15:20:48
Two little points:
1. It looks like he's wearing an Executioners hood, rather than a Knights helmet.
2. The laughing one looks kinda like he's making "Lalalala I can't hear you" noises. All he needs are his hands clamped over his ears. Which would be difficult, if you don't want to draw arms. Like Babar said, maybe a slight tilt to the head would help.

They're great as they are though, especially the little smile after the scream.
#2925
Beginners' Technical Questions / Re: walking
Wed 04/08/2004 14:30:35
You just need to add a label on the GUI and set its text to @OVERHOTSPOT@
#2926
The top left pixel of that pic, which AGS uses for the transparency, is the darker, border purple. Try changing that pixel to the lighter, background purple, hopefully that'll fix the problem.

EDIT: Yeah, what Radiant said. Really should read the other replies before I post.
#2927
QuoteFor adding to the Spellbook, first set the player character to SPELLS, then use the AddInventory command.
Or, create a function to do it for you, e.g.:

function AddSpell(int spell) {
   character[SPELLS].inv[spell] = 1; // add spell
   UpdateInventory();
}
#2928
By default, the 'USE' interaction only sets the active inventory item, so you'll need to pick another mode to use. I suggest making a new mode, 'INVUSE' - so:
Ã,  Ã, 1. Go to the 'Cursors' window of the AGS editor, and select the line that says Cursor 8: USERMODE1 (or something like that).
Ã,  Ã, 2. In the 'Cursor name:' box rename it to INVUSE. (This isn't totally necessary, but helps you to keep track)
Ã,  Ã, 3. Change the cursor image. Default 'USE' cursor is sprite 2057, in the 'Defaults' folder.

Now you need to add this to the Invetory GUI, so:
Ã,  Ã, 4. Go to the GUIs window, and select the INVENTORY GUI.
Ã,  Ã, 5. Add a new button, sprite number 2046 in the 'Defaults' folder.
Ã,  Ã, 6. Set the Left Click interaction to 'Set Cursor Mode', and 'New Mode Number' to 8.
Ã,  Ã, (You could do this with scripting, but it's a little more complicated, and not really necessary.)

Now, like Goot said, you need to tell AGS to use this GUI instead of the in-built one:
Ã,  Ã, 7. Open the script editor, and scroll near the top until you find this:

function show_inventory_window () {
Ã,  // This demonstrates both types of inventory window - the first part is how to
Ã,  // show the built-in inventory window, the second part uses the custom one.
Ã,  // Un-comment one section or the other below.
Ã, 
Ã,  // ** DEFAULT INVENTORY WINDOW
Ã,  InventoryScreen();
/*Ã, 
Ã,  // ** CUSTOM INVENTORY WINDOW
Ã,  GUIOn (INVENTORY);Ã, 
Ã,  // switch to the Use cursor (to select items with)
Ã,  SetCursorMode (MODE_USE);
Ã,  // But, override the appearance to look like the arrow
Ã,  SetMouseCursor (6);
*/
}

Ã,  Ã, 8. Change it to this:

function show_inventory_window () {
Ã,  GUIOn (INVENTORY);Ã, 
Ã,  // switch to the Use cursor (to select items with)
Ã,  SetCursorMode (MODE_USE);
Ã,  // But, override the appearance to look like the arrow
Ã,  SetMouseCursor (6);
}

You should now have an Inventory GUI with a Hand Icon on it. To make this mode work on inventory items:
Ã,  Ã, 9. Open the item's interaction editor, and choose 'Other click on inventory item'.
Ã,  10. Chose 'Run Script', then 'Edit Script', then add this to the script:
Ã,  Ã,  Ã,  if (GetCursorMode() == 8) {
Ã,  Ã,  Ã,  Ã,  //whatever you want to happen
Ã,  Ã,  Ã,  }

That should be it. Hope it helps.
#2929
SetAreaScaling (0, 75, 75);

Should do it, probably best in the Player enters screen (before fadein), otherwise you'll see EGO at the older scaling for a second before it changes.
Also, you could use the if (character[EGO].prevroom==2 line to set different scaling depending on where EGO enters the screen.
#2930
When the import sprite window opens, you can hold down the right mouse button to drag out the size of the selection (the 20x20 box) to fit your sprite, or, if your sprite is all that's in the image (no empty space, or other sprites, use the 'Grab entire image' button.
#2931
I don't think there's any limit on character size, except what'll fit on the screen. Roger's sprite are all about 15-20x40, and a lot of games use bigger than that. Where'd you hear about a 20x20 limit?

EDIT: sorry, cross posted.
What do you mean, you don't know how to draw a bigger one to fit?
#2932
Beginners' Technical Questions / Re: walking
Tue 03/08/2004 15:35:01
Ã,  Ã, if (button == 8 ) {Ã,  Ã, // give
Ã,  Ã,  Ã,  SetGlobalInt(80,2);
Ã,  Ã,  Ã,  }

to

Ã,  Ã, if (button == 8 ) {Ã,  Ã, // walk
Ã,  Ã,  Ã,  SetCursorMode (0);
Ã,  Ã,  Ã,  }

I think, but I'm not really familiar with how that GUI works. I did notice, however, that button 8 sets both 'give' and 'pull' modes. Should one of them beÃ,  'if (button == 0) {' ? Hope this helps.
#2933
MoveCharacterBlocking(EGO,player.x,230,1);

Which works if EGO is the player character, or the longer way,  for NPC's:

MoveCharacterBlocking(EGO,character[EGO].x,230,1);
#2934
About the Inventory items not showing up as cursor:
On the General settings panel, make sure 'Don't use inventory graphics as cursors' isn't checked. Sometimes it randomly checks itself.

About the interact button:
Do you just want the existing interact button (the arrow) to have the hand graphic, or do you want a whole new option (e.g to open a box, read a book, etc)?
#2935
I think Barbarian's right about the walking problem. (I was going to say more, but he posted while I was typing.)

As for graphics, InstaGame as suggested, or the RON site ( http://ron.the-underdogs.org ) might help. Don't know if you're allowed to use them in a non-RON game, but if you're just playing around with AGS it shouldn't be a problem
#2936
You need a SetInvDimensions(x, y); line in there, to resize the inventory objects to fit the new window. I think that should fix the scroll arrows as well.

BUT: This doesn't change the size of the objects, just the space between them.  The only way I can think of to do that is to actually make different sized sprites and change them using SetInvItemPic(item, sprite); to fit the size of the GUI. That would need a lot of coding, though, so it might not be worth it.
#2937
Hints & Tips / Re: Elegant Murder Mystery
Mon 19/07/2004 17:41:35
And then:
Spoiler
After finding the guy in the alley, go back to Jumbo's. Notice anything about the bouncer?
[close]
#2938
Are you talking about buying and selling inventory items? If so, you could create a custom property for each item to set its price, then use something like:

GiveScore (GetInvProperty(player.activeinv, "Price"));

You still have to set the property for every item, but it will save you having to write a different line of script for them.
#2939
Use FollowCharacter, and set the character to follow to -1, so:

FollowCharacter (JACK, -1);
#2940
No, more like this:

#sectionstart unhandled_event
function unhandled_event (int what, int type) {
  if (what == 1) { //if Hotspot
    if (type == 4) { // if Talk To Hotspot
      Display ("I could, but it won't answer.");
    }
    if (type == 7) { // if Pick Up Hotspot
      Display ("I'm not picking that up!");
    }
  }
  if (what == 2) { //if Object
    if (type == 2) { // if Talk To Object
      Display ("Aren't you a pretty thing?");
      Wait (20);
      Display ("It's ignoring me. How rude.");
    }
    if (type == 5) { // if Pick Up Object
      Display ("Why would I want to pick that up?");
    }
  }
}
#sectionend unhandled_event

I added a second 'type', to give you more of an idea how to do different ones.

To make a random response for Pick up object, for example, change:

    if (type == 5) { // if Pick Up Object
      Display ("Why would I want to pick that up?");
    }

to:

    if (type == 5) { // if Pick Up Object
      int ran=Random(2);
      if (ran==0) Display ("Why would I want to pick that up?");
      else if (ran==1) Display ("I'm not picking that up");
      else Display ( "It'll never fit in my pocket.");
   }


Hope this is some use.
SMF spam blocked by CleanTalk