Mittens 2018 will be in Boston this September. There are three spaces left, so check out the thread for details!

Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.


Messages - Khris

Pages: [1] 2 3 ... 526
1
Would this also apply to clicks on an "empty" inventory window slot, ie a click on blank space?
I don't think so; AGS reliably sets game.inv_activated to the ID of the clicked item, so to handle a click on the blank part of the inv window, you need to fall back to on_event.

Try this:
Code: Adventure Game Studio
  1. void RightClick() {
  2.   if (gInventory.Visible) gInventory.Visible = false;
  3.   else if (player.ActiveInventory != null) player.ActiveInventory = null;
  4.   else gInventory.Visible = true;
  5. }
  6.  
  7.   // in on_mouse_click
  8.   if (button == eMouseRight || button == eMouseRightInv) RightClick();
  9.  
  10. // set up on_event
  11. MouseButton last;
  12. void on_event (EventType event, int data) {
  13.   if (event == eEventMouseDown) {
  14.     for (int b = eMouseLeft; b <= eMouseMiddle; b++) if (mouse.IsButtonDown(b)) last = b;
  15.   }
  16.   if (event == eEventMouseUp) if (last == eMouseRight) RightClick();
  17. }

2
Right-clicking a GUI control should be caught by on_event / eEventGUIMouseUp/Down.
Right-clicking an inventory item can be handled with on_mouse_click / eMouseRightInv, provided you've activated custom inv click handling in General settings.

3
Yay, I'm in

4
If you open up the manual to the mandatory to read Tutorial section (or search it for "screenshot"), you will find:

Setting up the game -> General Settings, which has an explanation of each setting.
Quote from: manual
Save screenshots in save games - Saves a mini-screenshot of the player's current position into the save game file. This will create larger save game files, but it will mean that you can use a save game thumbnails GUI to make the save/load interface more professional.

As for associating it with a save game, what exactly do you mean? The default game uses
Code: Adventure Game Studio
  1.   SaveGameSlot(gameSlotToSaveInto, txtNewSaveName.Text);
so you can use that number and append it to the filename of your manually saved image. Is that what you mean? What is your end goal here? Why do you need extra screenshots?

5
The initial viewport coordinates depend on where the player character starts out in the room.
For a 1024 pixels wide game, viewportX is basically player.x - 512, with a minimum of 0 and a maximum of Room.Width - System.ViewportWidth.

I have no idea what you issue is, since I cannot translate "GetViewportX is not showing as it should" into anything meaningful.

Is cJonesP your player character? To which x coordinate are you sending them when you load the room? What do you expect to happen? What's happening instead? And so on. You know the drill.

6
To be perfectly clear, you can use the dialog system with a custom function, just not the usual way.

Dialog script example
Code: Adventure Game Studio
  1. // this calls player.Say() and can no longer be used
  2. player: Hello
  3.  
  4. // this has to be used instead
  5.  player.S("Hello");

7
Near the top of the second page of the Critics lounge: Vintage Game Art Style How???

8
I would make the cart a character and have it walk, but I need the cart to be able to turn visibility on and off.
Characters have .Transparency, which means you can set that to 100 to make them completely invisible. Please check the relevant section of the manual's scripting part before opening threads.

9
It sounds like you're looking for custom functions, in this case a customized Say() command. This is possible, sort of. (If you want your custom speech to be used for every line in the game, one major downside is that you can no longer use standard lines in dialog scripts; all spoken lines need to be using the custom function.)

Example:
Code: Adventure Game Studio
  1. // header
  2. import void S(this Character*, String message);
  3.  
  4. // main script
  5. void S(this Character*, String message) {
  6.   this.Say(message);
  7.   if (player.Room == cParrot.Room) cParrot.Say(message);
  8. }

By using player.S("Hello"); the parrot will now automatically repeat whatever the player says.

10
Code: Adventure Game Studio
  1. int manY;
  2. int manX;
  3.  
  4. function room_AfterFadeIn()
  5. {
  6.   manX=160;
  7.   manY=100;
  8.   SetTimer(1, 1);
  9. }
  10.  
  11. function room_RepExec()
  12. {
  13.   if (cChar1.x == manX && cChar1.y == manY && IsTimerExpired(1)) {
  14.     while (true) {
  15.       manX=Random(280);
  16.       manY=Random(173);
  17.       if (GetWalkableAreaAt(manX, manY) > 0) break;  // screen coords!
  18.     }
  19.     cChar1.Move(manX, manY, eBlock);
  20.     SetTimer(1, 50);
  21.   }
  22. }

This should do it.

11
So you do have an initial SetTimer call somewhere in the part of the script you didn't post?

12
The Rumpus Room / Re: What grinds my gears!
« on: 05 Apr 2018, 08:08 »
When people have programming issues and post "every time I do X, it does Y". DUH.

13
And all Timers must come first in the condition.
That's nonsense, both as a general rule and in this case specifically. If the timer expired before the character has reached her goal, the movement would end for good, since the condition never evaluated to true.

ShiningRice: "it doesn't work" is not a useful problem description. What happens exactly? Does the character never move? Move once?

14
If you want actual speech bubbles (as opposed to Display() text that looks like them): http://www.adventuregamestudio.co.uk/forums/index.php?topic=55542.0

15
Beginners' Technical Questions / Re: Missing Plugin
« on: 31 Mar 2018, 19:48 »
He's on twitter: https://twitter.com/NihiLTV

16
Beginners' Technical Questions / Re: RunAgsGame issue
« on: 27 Mar 2018, 22:31 »
Glad it's working, but can you tell us what exactly the issue was and what you did to fix it, in case somebody else finds this thread?

17
Beginners' Technical Questions / Re: RunAgsGame issue
« on: 27 Mar 2018, 19:13 »
I gotta ask: exactly how sure are you that AGS did not load the 2nd exe? How subtle exactly are those differences?

18
Check the GUI's Visibility setting, check General Settings -> Visual -> When player interface is disabled... and SetGameOption(OPT_WHENGUIDISABLED, ...) in the manual.

19
General Discussion / Re: Ask something - We can help.
« on: 26 Mar 2018, 21:17 »
What about Signal? https://signal.org/download/

Pages: [1] 2 3 ... 526