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

#81
Quote from: Crimson Wizard on Tue 07/06/2022 15:50:10
Quote from: Amir on Tue 07/06/2022 15:49:01
Quotecall System.SaveConfigToFile() if you want to write current game options to config file.

Where? I put it in game start and still have the problem, it always stays at default in winsetup. as I said you will have german main menu but the whole game is in English when you start the game again.

This function saves the current settings state. So you need to call it after you changed the settings.

Quote from: Amir on Tue 07/06/2022 15:49:01
That was handy. I had no problem with that.

Other people had, and complained, so I had to make this change.

Finally it works again, thank u :) I have to read the updates regularly, I don't do that. and what about the mouse? Is there also a new function? it dosn't lock to window.
#82
QuoteIs this the same problem as above, or a separate one where you get e.g. text in one language in one place and text in another language elsewhere?

Yes, the same problem.

Quotecall System.SaveConfigToFile() if you want to write current game options to config file.

Where? I put it in game start and still have the problem, it always stays at default in winsetup. as I said you will have german main menu but the whole game is in English when you start the game again.

QuoteIn the few earlier versions (I believe somewhere between 3.3 and 3.4) engine would automatically save config on exit, but that was disabled around 3.5.0 after complaints that engine writes over config unexpectedly.

That was handy. I had no problem with that.



#83
Quotemost of the recent work has been in finalizing 3.6.0, so I think until a new 3.6.0 is out it will be a bit difficult to find time to look into this without a test game that reproduces the issue for Game.ChangeTranslation("English")

The funny thing is that I tested it in 3.6.0 and it doesn't work there either. I tried alpha and beta, both have this bug. It only works with 3.4.... versions.
So, in 3.6.0 Alpha and Beta the mouse locks to windows, that's good but the language dos not change in winsetup after you change it in script. In 3.5.0 neither mouse lock to window nor language changing work. I find 3.4.0 the most stable version till now  ;-D but unfortunately I can't create it with 3.4.0 because it was made by 3.5.0. I hope maybe others have a solution for this bug. I don't want to do it without the buttons English Deutsch in the main menu :(

Quoteit will be a bit difficult to find time to look into this without a test game that reproduces the issue for Game.ChangeTranslation("English")

You can create a test game in 10 minutes  ;-D  to see that the language in winsetup dos not change when you change it in script.

QuoteAlso if some lines are translated and others are not, can you verify if the ones that are translated have something in common - like, neither of those have a german specific character like ü.

No no the translation works perfectly. Only the change does not work. You choose default language (German) in winsetup then save and play, in the main menu you click on the button English, it changes to English, everything is cool until now, you quit the game and look into winsetup, the language is still default language (German) NOT English as u changed it in script, when you start again you will have german main menu but the whole game is in English. That's just the problem.
#84
QuoteI get a mixture of English and German sprites in the game

No, I am stupid, that happens because I use ctr x to change the room to the menu, actually I don't really leave the game. Sorry  :-[
But the problem that the language doesn't change everywhere, is still there.

It looks like a bug. That's sad because like I said, I didn't have this problem with older versions.

CW, are you there? or anyone whos working on AGS?

I hope there is a quick fix for this. My game is almost done.

EDIT:
I noticed another problem. Mouse dosn't lock to windows. It's checked and all over auto_lock=1, speed=0
I've tried deleting everything in Data and Window folders and rebuild again but it dosn't want to lock to window.  (wtf)
#85
Oh cool, yes, exactly, but with free moving mouse cursor. I see you have limited mouse x and y in this room. I think this is not difficult to change in your code. Take your time, I can wait. Now I have a worse problem with changing the translation. (I posted it in Beginners' Technical section)

Cool game, I like the graphics. I will definitely play it at some point.

Thank u  :)
#86
It doesn't matter if it's hotsopts or objects, I can change it.

thanks for explaining the method, I understand it but i think I wouldn't be able to do it because i've never handled this Drawing functions before, so I asked if anyone has any code already and that's why I tried Rick's code . This would take me longer and require more work than the complicated lines-as-objects method. I can't find any modules with drawings at all, I might set them up faster so that I can draw lines from mouse.x to mouse.y. I will look again today.
#87
Hi,

When I use Game.ChangeTranslation("English"); the translation does not change in winsetup and in the game as well, when I change it and exit the game then start it again, it hasn't changed. When I do that from the winsetup then I change it again in game then I get a mixture of English and German sprites in the game. Is that a bug in 3.5.1.18 version or am I doing something wrong? I thought it was all auto-saved  ??? I didn't have this problem with AGS 3.4.3. Does anyone know why? please help, I can not release it like that.
#88
Hello,

I still have my last puzzle in the game where you have to match objects (or hotspots), with an OK button you have to click on it when you have matched to see if it's wrong or right. I have a complicated idea how to do this, using lines as objects. But it's complicated and takes a lot of work and time. I thought differently, I could maybe do it with drawing lines. when the left mouse button is pressed the mouse moves while the button is still down, a line is drawn between where you clicked and you let go the mouse button.

Something like that here: (this is not my puzzle ;-D)
Spoiler
[close]

I found this ancient code in this thread, since 2004. It looks like it's right for my puzzle but it doesn't work anymore. https://www.adventuregamestudio.co.uk/forums/index.php?topic=12390.msg148534#msg148534

I tried to fix it but the commands are from the Jurassic period.
Has anyone written or used some similar code before, or maybe there's a module I haven't discovered yet?
#89
Quoteyou should also remember the dragged object in a variable when the dragging starts

Sorry, I understood that differently. I could not have created this arranging on my own. Thank u very very much.

I just had to add this so that the object is centered on MY mouse cursor. (if anyone needs it)
Code: ags

DraggedObj.X = mouse.x-14;
DraggedObj.Y = mouse.y+30;
#90
Yes, with obj.X and Y I’m getting the problem null pointer referenced. All rooms of the puzzles are non-scrolling rooms.
Is there no solution to this before I try the module? I like this code. Small but nice and an abbreviation of the module.
#91
Hi,
I'm trying to do the same but for all objects in room 22. In global script because I have a button in the room, if all objects are on the right place and the player push the button, then bingo. I use isCollidingWithObject for that as well. But the code doesn't work. What am I doing wrong? Could someone fix the code please?

Code: ags

bool WasDragging;
int OldMyItemX;
int OldMyItemY;
function repeatedly_execute()
{
if ((mouse.IsButtonDown(eMouseLeft)) && (cBerny.Room == 22))
  {
    Object *obj = Object.GetAtScreenXY(mouse.x, mouse.y);
        // have we pressed a button over our object?
        if ((obj != null) && (!WasDragging))
        
        {
            // just started draggin? remember where you took it
            OldMyItemX = obj.X;
            OldMyItemY = obj.Y;
            WasDragging = true;
            
        }
        
        else if (WasDragging) 
        {
            // mouse button still pressed? continue dragging
            OldMyItemX = mouse.x;
            OldMyItemY = mouse.y;

        }   
        
    } 
    
    else if (WasDragging)  
    {
    // was dragging but mouse button now released? drop it
    WasDragging = false;
    }  
}


And for the button

Code: ags

function bBuecher_OnClick(GUIControl *control, MouseButton button)
{
if (object[2].IsCollidingWithObject(object[9]))  && (object[3].IsCollidingWithObject(object[10])) && (object[4].IsCollidingWithObject(object[11]))

Player.Say("Bingo");

}
#92
I had exactly this problem a week ago. Changing the speed of the frames made it worse for me. What helped in the end is this wonderful function Character.SetWalkSpeed(int x_speed, int y_speed)
#93
Quote from: Crimson Wizard on Sun 22/05/2022 13:54:17
Quote from: Amir on Sun 22/05/2022 13:34:15
Hi CW, guys,

Today I noticed 2 weird things, I don't know if these are bugs or normal.

Both are normal behavior.
1. SayBackground does not play voice clips. For non-blocking voice there's a new function Game.PlayVoiceClip since 3.5.0, which may be used in cobination with non-blocking speech text.
2. Rooms don't remember drawing on backgrounds and area states:
https://adventuregamestudio.github.io/ags-manual/Globalfunctions_Room.html#removewalkablearea

Aaah ok, I didn't know that. Cool function, I just tried it. Thanx.
#94
Hi CW, guys,

Today I noticed 2 weird things, I don't know if these are bugs or normal.

1:
cBerny.SayBackground("&1 Autsch!");

It doesn't work with "SayBackground" , I don't hear it.
BERN1 is in Speech folder and it's mp3.

2:
In Room 4, I remove WalkableArea 2 RemoveWalkableArea(2); but when I change the room and then come back to room 4, the WalkableArea 2 is back. It won't be removed forever, which I find illogical. it's easy to fix in Room-Load but I thought to myself I should let you know.
#95
Quote from: Crimson Wizard on Wed 18/05/2022 01:08:58
Quote from: Amir on Tue 17/05/2022 21:30:55
Hi, my game is 32 bit game but when importing the sprites I imported all with remap palette I think. Is it always marked with a tick under "import alpha"? I'm not sure if it was unchecked before and if I checked it then. Is there any impact to import with remape palette if the game is 32 bit game?

The effect is only applied when both game is 8-bit and image is 8-bit.

I think the reason why this checkbox is ticked by default is because sprite manager is not programmed to have separate defaults for 8-bit and non-8bit games.

Ah ok, thank u.
#96
Hi, my game is 32 bit game but when importing the sprites I imported all with remap palette I think. Is it always marked with a tick under "import alpha"? I'm not sure if it was unchecked before and if I checked it then. Is there any impact to import with remape palette if the game is 32 bit game?
#97
Quote from: Snarky on Mon 16/05/2022 22:25:56
I'm not sure what action.Text is, but basically the function I linked draws text onto a sprite you have to supply. (It's actually a little bit more complicated than that: you have to create a DynamicSprite and then grab its DrawingSurface, which is what the function actually draws on.) Then you set that sprite as e.g. a button graphic, a GUI background, a Graphic Overlay, etc. in order to display it. You can see an example in this thread.

This means, specifically, that if you're currently using a Label to display the text, you'll have to change it a little, since you're rendering a sprite with the text instead. If the text is the only thing on this GUI, I would suggest simply setting the GUI background graphic to this sprite. If there are multiple things on the GUI I would replace the label by a button and set its graphic to the sprite.

Thank u for the explanation but I think I'll do it differently which I like better. A gui with background and border over hotspots with the mouse cursor. But I have a problem. Can I post it here or in a new thread?


Edit: No problem anymore, I fixed it.  :)
#98
Quote from: Snarky on Mon 16/05/2022 16:46:02
Yeah, 3.5 broke all existing code that used System.ViewPortWidth (which was a lot). You can either set a script compatibility setting on the project, or you can make the updates Dave Gilbert lists in the last post on the module thread.

Quote from: newwaveburritos on Mon 16/05/2022 16:47:47
I followed those instructions and the speech bubble module is working great in 3.6.0.23

Ok thank you both, I got it, now it's thicker 2 pixels, but what about action.Text  ???  any idea how to get it the same outline too?
#99
QuoteIf the built-in support in 3.6.0 works for you, it might be easier to just use that version. I think it's getting close to official release now.

In case of doubt I will use 3.6.0.
I don't dare that because I don't read the updates and news, I'm not sure this version is secure, but as I said in case of doubt.
#100
Quote from: Snarky on Mon 16/05/2022 11:19:09
Well, it depends on what you want to use it for. To display some text on an overlay is pretty easy, but if you want to use it for all the game dialog you need to hook into or recreate a lot of the AGS speech system, and that gets rather complicated. It's essentially what the SpeechBubble module does, so you could potentially use that, just without the bubble. (It should be possible to set the bubble background and outline to transparent, but I have never actually tried it.)

If the built-in support in 3.6.0 works for you, it might be easier to just use that version. I think it's getting close to official release now.


Ok, I just tried the module, hoping to get thicker outline, but I got errors. eAlignCentre not defined, I changed it to eAlignMiddleCenter and now Im getting another error SpeechBubble_0.8.0.asc(1050): Error (line 1050): '.ViewportWidth' is not a public member of 'System'. Are you sure you spelt it correctly (remember, capital letters are important)?

I tried ur module once in AGS 3.4.3 and I had no problems.

SMF spam blocked by CleanTalk