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

#61
Instead of using tween, you can simply create the fade in/out of the gui or object, by looping the objects/guis transparency up/down with a 'while' function.
e.g.

Code: ags

while(gBlackGui.Transparency>0)
{
gBlackGui.Transparency=gBlackGui.Transparency-4;
Wait(1);
}


This makes the black gui that was initially set to 100% Transparency fade in.
#62
Cool that you try to create something new with AGS and not the typical adventure game!

Working on hard problems is fun! Glad you enjoy it!
#63
Aren't outdated, old functions brought up on a relatively regular basis?
Also module-related...
Maybe a section on that could be useful, which then refers to manuals and sections talking about upgrading...

I'm not sure what you mean with "tips", Gilbert, but there is an arrow down button that opens a list of all the labels in the editor. That is extremely helpful when you work with several rooms, and you cannot see all the open tabs anymore. That button is hard to see and could be mentioned as a tip.
#64
Quote from: PlayPretend on Sun 22/03/2020 19:10:31
Sorry, not sure what happened there!  Thanks for the assist!
I think it happened to me, too once before.
You cannot add a simple link as an image link. It only recognizes the image when you paste the exact image adress which inlcudes the image filename extension (e.g. ".png" at the end) ;)
#65
Jack, your picture with the reflection on the grass looks great.

Jwalt, for your first entry, I might even prefer the orginal version, not the finished one lol. The water looks just really cool in the original.

Here is my contribution. I recreated a scene that would be from an actual game I thought about creating and started doing first story line drafts for:

#66
Thanks Stupot for organizing the MAGS competition.

I already spent all my energy on the last month's MAGS game, so I think I will take it easy this month even despite the pandemic lol.
But I hope that people will take the extra time to create something especially creative and original! That would be cool.

I upgraded a few things in my game. Most obviously I added sound effects, I also calibrated the music volume, improved the rabbit hunt and other things.

I spent so many hours, sweat and work into this already just as it is, I don't think I will put the entire game up for free when it's finished, because there is still so much more to come.
But for now you can download it in it's current improved demo state here.

Stupot, if you want the link in the beginning of this thread to work, you'll need to update it, because I deleted the old one.
#67
It's fine nightmarer  :P

Regards
#68
Ah, okay. I checked, the topics are listed.


Especially the search tab would benefit from some improvements I think.

For the reason being:
You cannot jump to the search results directly.
Sometimes you have to spend minutes just scrolling through an entire topic, paying careful attention not to miss the little high lighted blue line marking the search result.
It's very time consuming and exhausting.

Also the layout of having all words highlighted is quite confusing and does not give you a good overview at all.

A better solution I could think of would be to obtain a list of all the paragraph titles of the search results. First the paragraphs that include the search term in their title, and then the paragraphs that include the search term only in their text body.

Also if not a list for clear overview, maybe a button that makes you jump from one search result to the next could be quite helpful. So that you do not have to scroll through the manual for "hours" just to spot and find the search result.

There is always a message displayed ("Click to cancel search!"), for a few milliseconds for EVERY search you do. That is confusing because it makes me wonder if it says that there were no search results found. Also, nowadays, computers do searches in milliseconds so this message is not necessary anymore.

The 'Match similar words' does not seem to be sufficient.
When I type for example hasplayerbeen I get no results. I have to type the entire function 'hasplayerbeeninroom' in order to obtain a result.
Also I do not get a suggestion when typing playerhasbeen. It would be useful if the search tab could give suggestions of that type in case you are looking for a specific function but cannot exactly remember its name.

(Btw, I did not find any topic on "player" or "points" (not pointers, points!) specifically...)

So far to answer your question...
#69
I found the topic when I searched it.
It is very clearly documented in the
"Upgrading to AGS 3.5" section of the manual.

So the documentation is proper.
However, the search engine in and of itself might need an upgrade or two imo, to be more usable...
#70
In case it might be helpful I'd like to mention that there is also a room_FirstLoad() function that is only triggered once the very first time when the player enters the room
(if you check the room's events panel).
#71
So just to clarify the suggestions above:

In the room load function of room1 you write

Code: ags

function room_Load() 
{
if(HasPlayerBeenInRoom(4)==true)
{oFlower.Visible=true;}
}


There is a way to address objects from Global Script for example by writing object[0].
But that would not help you here, and you have to be careful because if you run the function in Global Script with object[0] while you are in a room where there is no object with ID 0 the game crashes.
#72
To avoid the blinking you could try this:

you declare an int in Global Variables or at the top in the script body:

Code: ags
int timer;


In the on key function you write:

Code: ags
function on_key_press(eKeyCode keycode) 
{

if(keycode==eKeyA&imer<1)
{
gInventory.Visible = !gInventory.Visible;
timer  ;//(I'm not sure if it's being displayed correctly but I wrote "timerPLUSPLUS;" Sometimes the plus symbols are not displayed
}
}


Then in repeatedly execute always:

Code: ags

if(IsKeyPressed(eKeyA)==false)timer=0;


Unless you have a lagging game, normally this should not blink anymore.
#73
I think it's server related
#74
Congratulations JackPutter!
#75
Btw. MonkeySyrup,
great news, I have made a module called "Button Magic" that does all that automatically!

So with the module all you will have to write is this when clicking on the entire Gui:

Code: ags

function gGuiShelf_OnClick(GUI *theGui, MouseButton button)
{
MakeVisible(gGuiShelf);
}


(You have to define the gui that you use with all the book buttons on it (in this example gGuiShelf).

And then turn every button invisible when clicking on it:

Code: ags
function book1_OnClick(GUIControl *control, MouseButton button)
{
book1.Visible=false;
}

function book2_OnClick(GUIControl *control, MouseButton button)
{
book2.Visible=false;
}

function book3_OnClick(GUIControl *control, MouseButton button)
{
book3.Visible=false;
}

function book4_OnClick(GUIControl *control, MouseButton button)
{
book4.Visible=false;
}



When the function is run, the module automatically recognizes if the mouse is over an invisible button and if so turns that button visible.
It's very simple.

So now, buttons turn invisible when clicking on them, and back to visible when clicking again on where they were.

As it is, it works for Guis with no off-set. If your overall gui (the gGuiShelf in the example) has an off-set to the left and top you could tell me and I could add that, you would simply then have two function instead of the one (MakeVisible).

I sent the module link to your PM's.

It would be actually possible for you to write the ENTIRE thing in only 2 script lines, and absolutely nothing more, but I can't tell you about it because unfortunately there are people in this forum who would probably insult me if I did, because it wouldn't be the most conformal way.

Anyways, this will make things way easier for you.

I worked on something else and realized I could make this easily work for you, too, so there you go.
#76
In the forums they mentioned import/export when talking about parameters, but I did not find it mentioned explicitly that you can add the optional parameter only in the import part.
So thank you morganw. It works perfectly this way. Also with the Enum.
#77
Yeah, I can imagine it's too much work for what you're trying to do.
Btw. you could trick your way around not being able to click a transparent button, by having one pixel drawn on the original empty sprite (that you use the method Crimson Wizard suggested) with 0.1 opacity/transparency for that one pixel in the image editor you use, and the rest transparent. It's a little bit under the table advice, but in case nothing else works...
#78
Side note: Yes, normalGraphic corresponds to the image you see in the gui editor.

If I understood correctly, the above method works only with buttons that have text added to them (because of the transparent sprite), so I thought I'd add two more possible solutions here that can be considered for buttons without text:
Spoiler

When you click the book button, make it invisible.
e.g.:
Code: ags
book1.Visible=false;


Then you create a "On_Click" function for the entire Gui.
And in it you define the exact coordinates where the now invisible book button was placed before.

Code: ags
function gGuiShelf_OnClick(GUI *theGui, MouseButton button)
{
if(mouse.x>79 && mouse.x<140&&mouse.y>79&&mouse.y<131)//Here you calculate the exact coordinates of where the book was placed
book1.Visible=true;
}


So if you look what I did, when the entire gui is clicked, but only on the spot where the button usually is, the button/book will become visible again.
(You can calculate the exact button coordinates by adding it's lengths and offsets in it's property pane)

The second solution is to use the same approach as suggested in the thread above, but instead of using a transparent normalgraphic sprite it changes to, you use a sprite that is a cutout of the background.
For clarification:
The gui background:

The button:

The button on the background (background whitened for clarification):


Both solutions work reliably.
[close]
#79
Don't worry about the money, Mandle. Your mom made up for what you owe me.
Her butt hurts too, now btw.
And next time, before replying to my comment, maybe make sure to read it first, so you can reply with something more substantial than just unrelated, personal insults.


Crimson Wizard,

so here is a function I created for doing C-style rounding.
Code: ags
int CFloatToInt(float q, RoundDirection dir)
{
    if (q < 0.00) 
    {float r=-q;
    return -FloatToInt(r,  dir);}
    else
    return FloatToInt(q,  dir);
}

Btw. for some reason it doesn't let me make the Rounddirection optional.
When I write...
Code: ags
int CFloatToInt(float q, RoundDirection dir = eRoundDown)//added optional
{
    if (q < 0.00) 
    {float r=-q;
    return -FloatToInt(r,  dir);}
    else
    return FloatToInt(q,  dir);
}

...I get a parse error message for that line, and I don't understand why.
Also, I started to wonder, are there more functions that are useful in AGS but currently not included, like the absolute value function (abs) or this one just above?
It would be fun to create a little module that includes all of those expressions, so that you don't have to write every function yourself.
#80
Okay Playpretend. Btw, I can only recommend Playpretend to anyone who wants to work with him. He was super nice about it when I asked him if he wants to help, and not only did he do great voice recordings, but sent me very organized files and corrected mistakes I had made. All my recommendations!

So here I made the temperature sink at half the speed. I hope this will be more playable now and won't just kill the player off all the time.
Stupot, if you can do me the favor again, for the link:

https://drive.google.com/file/d/1l1UlhdLw3S18lbyisY8ygjUbvdZYSJbr/view?usp=sharing
SMF spam blocked by CleanTalk