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

#1
Hello everyone!

It's been a while since I've written on these forums, but I'm back with this wonderful program called AGS.

I'm a little rusty with the scripting part of AGS, so I want to ask for help

I'm trying to write a function to type text like a typewriter.

I have two problems with my current code:
1) I need to press any key (such as the mouse button) to skip the text and appear the next word (character).
2) The function does not work in the global script to be called in any room, but if you write the code in the room script, it works fine.

The code is the following:

Code: ags

function Typewriter(Character* ch, String text, int speed) {
    String textShow = "";
    for (int i = 1; i <= text.Length; i++) {
        textShow = text.Substring(0, i);
        Display(textShow);
        Wait(speed);
    }
}


And when I use the function for example when I look an object:

Code: ags
Typewriter(player, "Wow, Amazing", 10);

The function works fine, but I need to press a key, the text disappears and comes back with the next word, something like:
W
*presses a key*
*text disappears*
*text appears again*
Wo
*text disappears*
*text appears again*
Wow

Someone can help me with this?

Thanks in advance
#2
I know that the problem I'm going to talk about is not about skipping the dialog, but it is related to the print screen button so I don't think I have to create another post to talk about this.
I have this problem (don't know if it's just me or everyone) from the old versions of ags to the current one (3.6.0), so I guess it's not fixed. The problem is that if you use the print screen button with the game windowed, the screenshot is taken fine, you can paste it in paint/photoshop for example and everything is fine, but if you take the screenshot with the game in full screen and then paste the screenshot in any image editing program you will get a black image (in the current version it will be a black image with a white rectangle). Usually when you use the print screen button in full screen games you will get the actual image. I know you can use the ags built-in feature that saves a screenshot as an image in a folder, but sometimes people want to take a quick screenshot and paste it wherever they want. So this is an AGS problem or just me? Does this have a solution?
#3
Hello, I didn't know in which part of the forum to ask or say this so I assumed that this would be the best forum section.
I'm creating a game in 1280x720 resolution(But I tested this problem in other resolutions and it happens the same, anyway I tested this problem only in Windows 10, since I don't have another O.S)

When you configure the driver in Open GL or Direct3D and play the game in fullscreen (since this error only occurs in fullscreen), if you use the keyboard button Impr Pant PetSis (To take a screenshot) the only thing that appears in the screenshot it's a small white square in one corner and below that the program or window you were using (The screenshot below to show what it looks like).

Spoiler
[close]

Now, on the other hand, if you use Renderer Software, everything is perfect, the whole game looks fluid as if you were using the windowed game. And the screenshot with full screen works perfectly.

Another error that I should also notice is that if you choose the option Mode Native Game Resolution in the Setup and use Direct3D, the game despite being in Scaling Method Nearest-neighbor is deformed and blurred. (Screenshot below of how it looks, I take it with the program Fraps, because the problem that I mentioned of not being able to take screenshots in fullscreen with that mode).

Spoiler
[close]

And finally also I noticed that if the OpenGL option is chosen the mouse doesn't move pixel by pixel as it should, if you move it slowly it takes time to move, it's slower, unlike Direct3D and Software Renderer where that options makes it fluid as it should.

This things I tested in both AGS version 3.5.0 and 3.5.1.

I also tested if this problem was still in the WIP version of AGS 3.6.0, and the problem still continuing occur the same and the only one that allows taking the screenshot in fullscreen with the button is the Renderer Software.

Maybe all these errors that I said have already been known for a long time and have no solution, but just in case I wanted to comment on it, especially the screenshot problem, I know many people who like to use that button to take screenshots and if that happens it would be annoying for the players.
#4
Hi, in my game you will have 2 inventories, one (the main) only show 10 item spaces, and the other one (will show the items that you have in the main inventory and the rest of items) have more space (but will be restringed at first, something like resident evil that you can upgrade more space).

What I need to do is when you have your first 10 items, "block" in some way the inventory windows and start adding new items in the secondary one. Exist some way to know if you have the 10 inventory items spaces full? (Or know if more spaces are full, to implement the blocking inventory until upgrade like resident evil in the secondary inventory window)

I was reading the manual and tried to make my own function to add items, but I don't know why when you get the item number 11 the main and the second inventory suddenly have all the items sprites invisible.

My code is:

Code: ags
void AddInventoryExtend(InventoryItem *item, int addAtIndex) {
  if (PlayerMainShow.ItemCount >= (PlayerMainShow.ItemsPerRow * PlayerMainShow.RowCount)) {
    player.Say("Inventory full, will be added to the bag.");
    cSInventory.AddInventory(item, addAtIndex);
  }
  else if (PlayerMainShow.ItemCount < (PlayerMainShow.ItemsPerRow * PlayerMainShow.RowCount)) {
    player.AddInventory(item, addAtIndex);
  }
}


The code in some way work because the items are added to my inventory and the player says the message when I try to add the item number 11 but after that suddenly happen what I said above.

The other problem is that I will use the Khris script Stacking Inv (To stack the items and show the amount number), his code only works if I use with the global setting "display multiple icons for multiple items" deactivated, I delete the Krhis script and activated that option only to test my code because I read that the script ItemCount only works with that option activated. So exist some way to "fix" my code or do what I want (what I explained in the top of the post) and without using the itemcount (so I can use the Khris stacking inv too)?

Thanks in advance to whoever can help me
#5
Hello everybody. Today I was implementing a money system in my game. The int can already be seen in its respective Label GUI and I can add and subtract money from it, but I would like to know if there is a way when I add or remove money the numbers visually decrease or increase until the new value as many games do and how could it be done, since it would give more dynamism than just the new value suddenly appear.

I've been searching the forum but didn't find anything about it.

Thanks in advance
#6
First of all hi to everyone, I'm new around here hahaha. After a long time of experimenting with ags and helping a friend with his games, I decided to start a personal project and also took the opportunity to register on the forum.

I'm trying to make a game that uses the keyboard to walk (I'm using eri0's controlz module). The problem is the following: when you keep the keys pressed, the character walks perfectly well and fluidly, but if you decide to just tap the keys, you can notice that the character makes huge jumps during the walk. Investigating I notice that this can be solved by changing the character speed to 1 for example, then in that way the walking tapping works perfect and fluid but it is incredibly slow if the key is pressed all the time so the character can walk for a longer time. I tried to fix it with on_key_pressed but it changes the speed to 1 all the time and not just when it is tapped.

My question is: is there any way that the character speed is 1 only if the key is tapped but 4 (for example) if it is pressed all the time?

Thank you so much in advanced
SMF spam blocked by CleanTalk