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 - pcj

#121
Huh.  Good to know.
#122
Something like:
Code: ags
short x = 0;
while (x<Game.GUICount) {
  gui[x].Visible = false;
  x++;
}


(Or you can DisableInterface(); if you just want to disable interaction with GUIs)
#123
Quote from: Arjunaz78 on Tue 11/10/2011 22:36:10
I've follow the AGS Editor tutorial/guide about disabling right click mouse option at http://americangirlscouts.org/agswiki/ but i can't get through it because it's absolutely confusing me.Besides the wiki just guiding the old version of AGS Editor. (v2.7) instead of AGS Editor v3.2.1 that i currently using.

The 2.7+ code is the same for 3.2.1.  I'm having trouble understanding the rest of your post...
#124
Use player.Walk(x,y,eBlock);

For more information, see the Help file.
#125
Quote from: Ekeko on Mon 10/10/2011 20:57:24Maybe I'm about to say something that might be wrong...  But I think that two-character variables can't be used

Nope.  It just sounds like the hotspots aren't set up correctly.
#126
Ah right, sorry about that.  Glad you got it working.
#127
Advanced Technical Forum / Re: Timer help
Thu 06/10/2011 19:04:42
Don't post the same question in more than one forum at the same time - it won't be answered any faster.

http://www.adventuregamestudio.co.uk/yabb/index.php?topic=44580.0
#128
You'll need to set another timer with iWaterBtl_Interact() and check it in repeatedly_execute().  If the first timer has expired, check if the second timer has expired, then perform the heatUp(), otherwise don't do anything.

Code: ags

bool waterTimerEnabled;

function repeatedly_execute() 
{
   if (IsTimerExpired(1))
    {
      if (!waterTimerEnabled || (waterTimerEnabled && IsTimerExpired(2))) {
        heatUp();
        SetTimer(1, 100);
        waterTimerEnabled = false;
      }
    }
}


//[...]
function iWaterBtl_Interact() 
{
   coolOff();
   waterToken--;
   if (waterToken == 0) cChristian.LoseInventory(iWaterBtl);
   mouse.Mode = eModeInteract;
   waterTimerEnabled = true;
   SetTimer(2,2400);
}

#129
I can't think of a way to do this without rendering a custom dialog.  You can change the color of previously-selected options with game.read_dialog_option_color but that doesn't sound like what you're looking for.  I think a custom dialog is the only way here - see "Custom dialog options rendering" in the help file for more info.  Hope that helps.
#131
Are your sounds (especially aSound19) long in duration?  Do you have a lot of other sounds playing when that room loads?  It should just fail (without error) if it can't play...doesn't make sense.
#132
Yeah...crossfading and channels means sound.  Are you getting the same error with the new code then?
#133
Well, just make gPanel visibility off by default, and only code the on_key_press function for the rooms you want the ability to show it with ESC.

Basically, what I'm saying is you can use on_key_press in a particular room, not just globally.
#134
You don't need to export functions, by the way.
#135
You need to make sure iat exists before performing operations on it.  If there is no inventory item under the cursor there will be an error.

Code: ags
function on_mouse_click(MouseButton button)
{
  CursorMode mode = eModeInteract;
  if ((button == eMouseRight) || (button == eMouseRightInv)) mode = eModeLookat;
  else if (player.ActiveInventory != null) mode = eModeUseinv;
  if ((button == eMouseLeftInv) || (button == eMouseRightInv))
  {
    InventoryItem *iat = InventoryItem.GetAtScreenXY(mouse.x, mouse.y);
    if (iat) {
      if (iat.IsInteractionAvailable(mode)) iat.RunInteraction(mode);
      else if ((button == eMouseLeftInv) && (player.ActiveInventory == null)) player.ActiveInventory = iat;
      else if ((button == eMouseRightInv) && (player.ActiveInventory != null)) player.ActiveInventory = null;
    }
  }
  else if (IsInteractionAvailable(mouse.x, mouse.y, mode)) ProcessClick(mouse.x, mouse.y, mode);
  else if ((button == eMouseLeft) && (player.ActiveInventory == null))
  {
    ProcessClick(mouse.x, mouse.y, eModeWalkto);
  }
  else if ((button == eMouseRight) && (player.ActiveInventory != null))
  {
    player.ActiveInventory = null;
  }
}


(The code could be simplified somewhat due to some other logic mistakes but it shouldn't throw an exception)
#136
I'm assuming you've got the walkable area set up correctly...

Try setting the object's Solid property to false.  If that works you might need to tweak its BlockingWidth or BlockingHeight property (if you want to keep it solid).
#137
Engine Development / Re: AGS engine PSP port
Mon 03/10/2011 18:21:16
Quote from: timofonic on Mon 03/10/2011 17:44:43I also appreciate my rights as user.

What rights are those, the ability to demand that the author change his code to accommodate your wishes? I'm not familiar with those.
#138
Just sounds like a memory error, completely close out of everything, restart Windows, and rebuild the game and see if that helps.
#139
You can also CallRoomScript() at the end of a dialog script for a more straightforward way.
#140
That's a bit over-compensating for what sounds like a simple problem.  Try a different font and see if that works?
SMF spam blocked by CleanTalk