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

#1
Hello,
So I noticed lately that all my buttons and hotspots isn't giving me the right "hover-cursor-over" place where they should be. Don't get me wrong, they're all still in their right physical place, but whenever I move my cursor over the "Give" button, I find that it's not lit up (a.k.a. clickable) until I move the cursor a little further down. I've included examples in here so you can see what I'm talking about.







Now, I don't think it's an GUI error, because it happens to hotspots too. Any ideas here, anyone? :/
Using AGS 3.3.4 with the 9-Verb MI-style template.
Thank you!
#2
Hi again everyone!
Need a little help with my script that I believe you guys have a nice solution to :)

So I've created a region in a room; when the player walks onto this region, he will change rooms and say a few words when he enters said room.
This is how my script looks like for room number 2:
Code: ags

function region1_WalksOnto(){
    player.Say("Blablabla.");
    player.ChangeRoom(1, 100, 200);
}

Now, as I said, when the player changes room I want him to say a few things, so this is my script in room no. 1:
Code: ags

function room_AfterFadeIn()
{
  if(player.PreviousRoom == 2)
  {
    player.Say("Please help me find a solution to this problem!");
  }

However, my problem is, the player will say this line every time he enters the room, even if I don't walk onto the region. How do I make him say it only once and not every single time I enter the room?

Thank you for your help!
#3
Hello all!
In my game, I have an NPC (just a normal character) that I want my playable character to talk to. But whenever I choose "Talk to" and click on the NPC, my character will first walk to the NPC and literally stand on him before moving away to the side. I have the following code implemented:

Code: ags
function cNPC_AnyClick()
{ 
  cPlayableCharacter.Walk(116, 262, eBlock, eWalkableAreas);
  Game.TextReadingSpeed = 9;
  // TALK TO
  if (UsedAction(eGA_TalkTo)) {
    cPlayableCharacter.Walk(116, 262, eBlock, eWalkableAreas);
    cPlayableCharacter.FaceDirection(eDir_Left);
    dNPC.Start();
  }
  else Unhandled();
}


With this code, my intent was to have the playable character move to a fixed position AND THEN talk to the NPC. But my character will instead move to the NPC first (almost standing right on top of him) AND THEN move to the co-ordinates and talk to the NPC. What should I do? I'm using the 9-Verb template. Thanks! :)
#4
Hi guys! It's me, again :P

I tried to search the forums for this one, thinking it might be a common question, but I couldn't find anything. Either way:

If I want to change a hotspot name in the middle of a Look-At function, how would one do that? E.g. let's say we have a hotspot named "Flowers" then when I use "Look-At" at it, the character will speak some lines and after he's finished, the hotspot will be named "Beautiful flowers".

P.S. Using the Verb-9 template :)

EDIT: One more thing, whenever I'm trying to walk on an area that's covered by the GUI gAction, my character simply won't walk over it. I've tried mixing with the properties, e.g. setting the clickable area false, etc, like this picture.
How can I make my character walk over the GUI gAction? As of now, it seems as the GUI is functioning like a block or a wall that prevents me from moving my character there.
#5
Hi!
I have two (almost) identical backgrounds. One with a door closed, and one with a door open (I didn't care to make objects out of the doors).
I want the character to be able to "open" the closed door so the game switches backgrounds to the one with the open door.

Is this possible?
If so, what would be the easiest way to do it? Create a hotspot around the closed door and have the player use "Open"/"Close" on it?
I'm using the 9-Verb template, btw.

Thank you for answers!
#6
I'm trying to create a cutscene for my game. If I'm not mistaken, you create cutscenes with the help of additional rooms? Well, suppose I want to change to a cutscene in the middle of a "Look-At" command, like this:

Code: ags
//Original room
    if(UsedAction(eGA_LookAt)) {
    player.Say("Text, text, text");
    cCharacter.ChangeRoom(61, -100, -100);
    player.Say("More text!");
  }


The cutscene's purpose: to create a sort of "Five minutes later" screen after the player has used "Look-At" on an object. After the scene is finished however, the character will continue speaking. Like this, for instance:


  • Character: Wow, look at that sky, I wonder if...
  • *Switch to cutscene room*
  • Text displayed in the center of the screen: Five minutes later
  • *Switch back to original room*
  • Character: But after some thought, that wouldn't work.
However, when I execute and run the command in my game, my character will speak his lines all through and then at the end of it, it'll change the room. As if I had written the function like this (which I don't want):

Code: ags
//Original room
    if(UsedAction(eGA_LookAt)) {
    player.Say("Text, text, text");
    player.Say("More text!");
    cCharacter.ChangeRoom(61, -100, -100);
  }


The code inside the cutscene room looks like this:

Code: ags
// Cutscene room
function room_AfterFadeIn()
{
  Overlay *textOverlay;
  textOverlay = Overlay.CreateTextual(160, 160, 100, Game.NormalFont, 7, "Five minutes later...");
  Wait(50);
  cCharacter.ChangeRoom(1);
}


So, my question is: How can I make a cutscene in the middle of a "Look-At" function and after it's done playing, resume the character's actions/dialogue?

P.S. How can I make the text "Five minutes later..." centered on the screen? Is there a fast way to do it without calculating the X and Y co-ordinates?

Thanks!
#7
Hi!
I'm having problems walking on a hotspot. The hotspot itself is the ground, and I want to be able to move across it freely. But when I just regularly click on it, it does nothing. I can only use the other commands "Look-At", etc.
I have drawn a walkable area on the ground as well...

Any ideas?

Thanks!
#8
Hi!
I tried to search the forums for this as well as the manual, but nothing came up, so I'll post it here:

I'm making a game with the Verb 9 (LA-template). Is it possible to receive different answers when you "Look-At" something?
E.g. when you use Look-At on a tree the first time your character will say "Text1" and the next time you Look-At the tree, the character will say "Text2".


Also, a minor problem I have is to delay my character's change of direction when he looks at something. I wanted him to be confused, so he would look right, then left, then right again. However, if I use the "player.FaceDirection(eDir_x);" command, he'll do it so quickly. I want him to stop up for a second and just look at that direction before changing. This is my code:

Code: ags
function hPath1_AnyClick()
{
  if(UsedAction(eGA_LookAt)) {
    Game.TextReadingSpeed = 7;
    player.FaceDirection(eDir_Right);
    player.Say("Is that a path...");
    player.FaceDirection(eDir_Left);
    player.Say("Or is that...?");
    player.FaceDirection(eDir_Right);
    player.FaceDirection(eDir_Left);
    player.FaceDirection(eDir_Down);
    player.Say("I'm confused!");
  }
  else Unhandled();
}


I've read that you can use the Animation and LockView, but those didn't really work because I couldn't set a delay timer on them. Any thoughts?

Thanks!
#9
Hi!
I'm fairly new to the AGS editor, and have now experienced my first problem that I hope someone knows the answer of.
I've created an object with an inventory sprite, but in-game, the cursor doesn't seem to detect the whole sprite (see images for reference).




I have the exact same width and height as the default template sprites (31 x 23), and I believe all my scripting is in order.
For your information, I've made the sprite in Piskel (http://www.piskelapp.com/), and I created it in the 31 x 23 size.

As a side note, I also have a problem with my character when I click to walk somewhere. He never goes exactly to the spot I clicked with the cursor. He always stands a little bit above the place I clicked. I did use the crop function already, so there is no obsessive space left in my sprites. Could this be linked to the above problem?

I'm saving all my sprites as .png and crop them (inside the AGS) before using.
Does anybody know the problem here? Would be greatly appreciated if anyone could help me out! :)
SMF spam blocked by CleanTalk