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

Topics - nightmarer

#1
Hello.
I would like to personalize some Characters with some special features.
For example, I would like to add a bool variable which defines if the Character is alive or dead.
I don't know if it is posible to do that. I want to clean global variables to define this.
Which would be the better way of doing this in AGS?
#2
Hello.
The following code is in global script/execute always function.
It works to create animation for character when you are using mushots aswell, but it is not working when the character speaks inside a dialog,
it seems that the character inside the dialog is not detecting Character.Speaking function.

Code: ags
  if (Sara.Speaking && !Sara.Animating) {
    Sara.ChangeView(242); //Change to speaking animation
    Sara.Animate(Sara.Loop, 3, eRepeat, eNoBlock, eForwards);
  } else if(!Sara.Speaking && Sara.View == 242) {
    Sara.ChangeView(244); //Change back to walk animation
  }


Any idea about how to solve it?
#3
Hello.

My global script is growing and growing, and now it is so long that it is really difficult to read.
How it would be the best solution to keep all the Character and inventory interactions in separated scripts?

Regards.
#4
Hello.

In the eKey list I don't see a eKey for the Enter key (eKeyEnter)
Does it have another name?

Regards.
#5
Hello.

I'm getting a weird error while loading one room.
This is how it looks in AGS.

https://imgur.com/hdC98AV
This is how it is shown when running the game.

https://imgur.com/nJp4CMN
Anyone has an idea why is this happening?

Regards.
#6
Hello.

Seems that Character.Moving function is not detecting the movement of my character out of a point and click movement.
If I'm moving the character through a Character.Walk function blocked then the Character.Moving returns false.
I also tried to do it through Character.Frame > 0 and still doesn't work.
How I'm able to know that the Character is moving then?

This function is run through the RepExec.

Code: ags
function walking() {
  if (stop == true && Character.Moving == true){
    stop=false;
    Display("Inside");
  }
}

#7
Hello.

I have an struct which have some methods on it and it can be used from any room of the game.

Code: ags
struct Actions{
  import static void Restablecer();
};


But now I am trying to call one of this method from another method not included in a room (in an external script) but AGS don't recognize it. And it says Error (linex): Undefined token 'Actions'
Code: ags
function HangUpPhone() {
  Actions.Restablecer();
}


How can resolve this?
#8
Hello.

I am trying to create someking of an instance msg app for the inventory, and I am using a struct with an array, at is explained in AGS documentation.
This is the struct in the header of a script:
Code: ags
struct MsgPDA {
String Sender;
String Message;
};


And in the body of the script I have declared the array as:
Code: ags
MsgPDA msg[30];


And through the following function above in the same script I'm trying to make it able to call from any room or the game.
Code: ags
void MessageContent(int index, String sender, String sms) {
  msg[index].Sender = sender:
  msg[index].Message = sms;
}


It says that msg is an undefined token.
What am I doing wrong?

Regards.
#9
Hello all.

I'm having the following issue.
When I change the y axis parameter it just ignores the continuous Scaling of the room and goes back to the 100% size of the character.
Code: ags
Character.y += 10;

Do you know how I can avoid this?

Regards.
#10
Hello.

I am trying to create a function to make my player to change his view, but as the view it has not the same size than the Normal view I need to move this new view to place so there won't be a gap from one to another. If I do it in a room without scaling that is easy, but the problem happens when the character is in a room where there is scaling, because the distance from one view to another changes.

I would like to know how this scaling works, because if I understand how it works I would make it work in any place of the walkable area.
Also I would like to know if there is a way to get the actual scaling where the player is, so then I would be able to apply a calculation.

This is how it works. There is another method who sents first the parameters, and the second option in parameter direccion sets back to the first position.

Code: ags
static void Actions::Correcciones(Character *personaje, int x, int y, Direction direccion) {
  if (direccion == eForwards) {
    personaje.x = personaje.x + x;
    personaje.y = personaje.y + y;
  }
  else {
    personaje.x = personaje.x - x;
    personaje.y = personaje.y - y;
  }
}
#11
Hello.

I would like to transfer all the items from one character to another character which is going to be the player.รง
I was trying to create a for to transfer them from one to another, but I don't know which property gets the number of that array

Code: ags
  for(i = 1, i < CharacterA.InventoryQuantity[].length(), i++) {
    CharacterB.InventoryQuantity[i] = CharacterA.InventoryQuantity[i];
  }


Thank you.
#12
Hello.

I want my player to move inmediatly to another location in the room. I tried Change Room using as room the same room, but it does again the room Load.
I'm sure there is a way to do it but I didn't get it yet. Does anybody know how to do it?

Regards.
#13
Hello.

There is many functions to set the direction that a character is facing to, but I would like to know if there is a why to get which is that direction in orden to build an script that will run the proper loop and save many lines of code.
Any idea?

Regards.
#14
Hello all again.

I'm trying to build somekind of SMS application for my game in which the main character will be able to read all the incomming messages other charaters may send to him.
To achieve this I have defined an struct in a script header in order to have two strigs, one with the sender, and another one with the text message.
Code: ags

struct MsgPDA {
String Sender;
String Msg;
};


Following the struct documentation in the following link https://www.adventuregamestudio.co.uk/manual/ags43.htm#struct
Following the recommendation I am trying to combine it with an array.
Code: ags
MsgPDA msg[10];
msg[0].Sender = "Sara";
msg[0].Msg = "Hello, its me.";


My intention is to call this array from any room. But I don't know where I need to place each part of the code, as I am receiving
My questions:

  • The struct I guess it goes in the header of the script. Is that right?
  • Where I should place the array definition? If I enter in the body of the script it says that msg is unexpected.
  • Do I need to do something else to call this array from any room?

Thanks and regards.
SMF spam blocked by CleanTalk