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

#61
oh thanks...i'll try it...  :grin:
#62
What is the best way so that when using an inventory object A, with an inventory object B, the resulting action is the same as if we do it the other way around, that is, use the inventory object B with the inventory object A ? When there are a lot of objects in a game, what is the best way to implement this?
#63
And then
Code: ags
function RandomLook(String name,  int generoNumero) {

  random = Random(5);
  String demostrativo;
  if (generoNumero==1)
  {
    demostrativo="ese";
   }else if (generoNumero==2)
   {
     demostrativo="esa";
   }
   else if (generoNumero==3)
   {
     demostrativo="esos";
   }
   else
   {
     demostrativo="esas";
    }
	if (random==0) cPerxeo.Say("Confía en mi, tu  no quieres mirar %s %s.",demostrativo,  name);
	else if (random==1) cPerxeo.Say("No hay nada importante en  %s %s.",demostrativo,  name);
	else if (random==2) cPerxeo.Say("Mirar %s %s es una perdida de tiempo.", demostrativo,  name);
	else if (random==3) cPerxeo.Say("No hay nada importante en %s %s.",demostrativo,  name);
	else if (random==4) cPerxeo.Say("No tiene mucho sentido mirar %s %s",demostrativo,  name);
	else if (random==5) cPerxeo.Say( "Vale, ya  miré %s %s, y ahora que?",demostrativo,  name);
}
#64
Thanks for your answer.I've achieved my purpose!!

Code: ags
function unhandled_event(int what, int type) {
	String locname;
	String invname;
  int generoNumero;
  int theHotSpotID;
  int theObjectID;
  int theCharacterID;
	locname = Game.GetLocationName(mouse.x,mouse.y);
  String hotSpotProperty;
  if (what==1) //HOTSPOT
  {
    Hotspot *theHotSpot = Hotspot.GetAtScreenXY(mouse.x, mouse.y);
    //generoNumero=hotspot[what].GetProperty("generoNumero");
    //hotSpotProperty=Hotspot.GetAtScreenXY(mouse.x, mouse.y);
    if (theHotSpot!=null)
    {
      theHotSpotID=theHotSpot.ID;
      generoNumero=hotspot[theHotSpotID].GetProperty("generoNumero");
   ;
    }else
    {
      Display("No hay un HOTSPOT");
      generoNumero=0;
      }
    
  }
  else if(what==2) //OBJECT
  {
      Object *theObject = Object.GetAtScreenXY(mouse.x, mouse.y);
      if (theObject!=null)
    {
      theObjectID=theObject.ID;
      generoNumero=object[theObjectID].GetProperty("generoNumero");
      Display("GENERO NUMERO %d ", generoNumero);
    }else
    {
   
      generoNumero=0;
      }
  }
  else if(what==3) //CHARACTER
  {
     Character *theCharacter = Character.GetAtScreenXY(mouse.x, mouse.y);
      if (theCharacter!=null)
    {
      theCharacterID=theCharacter.ID;
      generoNumero=object[theCharacterID].GetProperty("generoNumero");
      
    }else
    {
      Display("No hay un CHARACTER");
      generoNumero=0;
      }
  }
#65
Thanks for the quick reply. What I want to achieve is that in the unhandledEvent event, there are random responses for the look, use, talk cases based on a random variable. But since many descriptions are feminine, masculine, singular and plural names, I have to adapt the answers to these concepts of gender and number. That's why I need to know exactly which object has triggered that unhanled event. For example, if I do "look at ceiling lamps", the answer cannot be the same as if I say "look at the wall". One is plural and the other is singular, so I want to make a little "parser" of responses, based on the exact object and a property that will indicate its gender and number.
#66
In an unhandled event, I can know two parameters that are the what and the type to know if we are interacting with a hotspot, an object, an inventory object, etc...
I would also like to know how we can find out which is the exact object that has called that unhandled event, to know not only if it is an object or a character, but also what it is and what its specific ID is. That's possible?
#67
Ah... ok. I never fully understood this concept. I thought that 16 colors had to be used in the same mask, to be able to do edge smoothing or something like that... thanks for the explanation!
#68

In that case, if I need two or more walk-behind regions, only one can be an imported bmp, and the rest must be regions drawn with the AGS drawing tools, right?
#69
I'm trying to add two walk behind areas to my game. First I select the Walk-Behind area ID 1, >>> Import mask from file >>>> and load the BMP image for area 1 and set the baseline. Then I select the Walk-Behind area ID 2 >>>> load another BMP for this area 2 and establish its baseline. Now when I go back to the walk-behind ID 1 area...it's gone. I don't know if there can only be one bmp loaded at a time, or I'm putting the layers in the wrong order to place my walkable-areas, but I don't know what the proper process is to be able to have 2 walk-behind areas at the same time .... any help????
#70
Thanks for all!!
#71
Quote from: Crimson Wizard on Fri 31/03/2023 08:37:28In this particular case you don't need to use global variables at all, you may just do
Code: ags
Display("It's a red key");
THANKS!!
#72
In order to solve this issue....
I have created a variable in the global variables editor. I have configured it like this:
Name > LookKey
Type > String
Initial Value > It's a red Key
Now, I would like to know how I replace this obsolete sentence
DisplayMessage(500);
by something like this:
Display("%d", LookKey);
to see the content or string of this variable and that "It's a red key" appears on the display. Thanks!!!
#73
I am a newbie in this and certain things still cost me, but I am gradually understanding it. Thank you!!
#74
Hello! I am analyzing and studying some open games line by line, which I have found in the list provided by Crimson Wizard (Thanks), and I am seeing, in the Quest demo, that the expressions DisplayMessage(NUMBER), where number is > 500, are repeated a lot. I have seen in the manual that numbers greater than 500 represent global messages, but I don't know where these global messages are stored and I can't find them throughout the game. Where are these global messages? Thank you!!
#75
Quote from: Snarky on Wed 29/03/2023 15:01:57You don't actually need to write the topic title in all-caps. It looks like you're shouting.
(Sorry, it's a strange habit I'll take in count from now on in order to avoid it!! Thanks)
#77
Thank you very much!!!!!
#78
Hi everyone!
In this struct sentence:

struct PlayerInfo {
   int normal_view[5];
   int idle_view[5];
   int enabled_icon;
   int disabled_icon;
        bool added;
 
   Button * button;
   Character *character;
};
what's the difference between:

Button * button;

Button* button;

Button *button;


relative to the position of the asterisk??
The game still compiles, and works perfectly, no matter what position the asterisk is in.
Thanks in advanced!!

#79
Thank you very much, I have found some treasure among all those links. I already have a lot of interesting material to start with. Thank you very much!!
#80
AGS Games in Production / Re: REBOOT
Wed 29/03/2023 08:27:35
it looks great!! congratulations!!
SMF spam blocked by CleanTalk