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 have in my game SierraWithBackgorund as Speech style in my general settings.
But there are sometimes which I prefer not showing the mugshots.
So I'm using
Speech.Style = eSpeechLucasarts;
in my script.
The first problem is that whenever the character speaks it turns in the mugshot, as the SpeechView is still the mugshot. Then I change the SpeechView to the standard view of the caracter, and then whenever the character speaks it does the walking movement.
How can I deal with this problem?

Regards.
#2
Hello.

I am having a Null Pointer Exception with an Audio Channel set in one room, but it happens the second time I visit the room.

Code: ags
AudioChannel *acPropaganda;

function room_Load() {
 acPropaganda = aSpeech_close.Play();
 acPropaganda.SetRoomLocation(866, 252);
}

function room_Leave(){//Always exit from Station Out
 if(acPropaganda.IsPlaying) {
    acPropaganda.Stop();
 }
}

The SetRoomLocation line is the one which is returning the error, I tried using
Code: ags
function room_Load() {
 acPropaganda = aSpeech_close.Play();
 if (acPropaganda == null) 
  acPropaganda.SetRoomLocation(866, 252);
}
but then I'm having the Null Pointer Exception in the if.
I don't know what I'm doing wrong.
#3
Hello,

I've been trying to make my character to change the view but it is not doing it.

Code: ags
    Isaac.ChangeView(583);
    Display("%d", Isaac.View);

The display it shows the number 583 rightly, but it is showing the normal view of the character. The view 583 is showing other sprites.

I think that this is a kind of bug.

I'm still using the 3.5.1 and the last patch, by the way.
#4
Hello.

I'm trying to block the character while a GUI is shown, but I don't want to pause the game.
The problem is that this GUI doesn't block the whole window, so while this GUI is shown if I click outside of it,
the player walks and even it can do interactions. So I want to block any interaction with the room while this GUI is opened.
How can I do this?

Thanks and regards.
#5
Hello.
Every NPC in my game is displaying every "Say" text in white, in spite they have another color selected in Speech.Color.
[imgzoom]https://i.imgur.com/oYnxsoR.png[/imgzoom]
[imgzoom]https://i.imgur.com/UR4M12o.png[/imgzoom]
[imgzoom]https://i.imgur.com/H3ggYk5.png[/imgzoom]
Why is this happening?
#6
Hello,
I want to know if there is a way to disable the mugshot for some characters in a Sierra Speech Style game.
I just want to make some not relevant NPCs speak without the mugshot, or NPCs which are not visible in the screen.
I have the Saybackground function, but this function is writes the text always in white color, so it is difficult to know who is talking if there are more than one NPC speaking.
Regard.
#7
Hello all, long time no see.

I'm receiving a random error while setting SetRoomLocation method to an AudioChannel as soon as I enter in one room.
Error running function 'room_AfterFadeIn': Error: Null pointer referenced
The weirdest thing is that it happens one time every four times I enter in the room.
This is the code, and I just using it as it is refered in the manual.

Code: ags
//ROOM SCRIPT
AudioChannel *carBurning;

function room_AfterFadeIn(){
    carBurning = aExplosionroom_burningcar.Play();
    carBurning.SetRoomLocation(oCarFire.X, oCarFire.Y); //This is the row that the error points
}


BTW, if it works sometimes it just stops playing when another sound in the room is played (not using that AudioChannel)
BTW, I'm using AGS (Build 3.5.1.16)
#8
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?
#9
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?
#10
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.
#11
Beginners' Technical Questions / eKeyEnter
Sun 04/07/2021 08:52:35
Hello.

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

Regards.
#12
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.
#13
Advanced Technical Forum / Character.Moving
Tue 25/05/2021 21:20:49
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");
  }
}

#14
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?
#15
Advanced Technical Forum / Struct with arrays
Tue 20/04/2021 00:18:43
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.
#16
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.
#17
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;
  }
}
#18
Beginners' Technical Questions / Array length
Thu 08/04/2021 22:42:52
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.
#19
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.
#20
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.
SMF spam blocked by CleanTalk