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 - Rik Vargard

#1
Hello,

I'm working on a simple fight script.
At some moments the camera moves to the right and back to the left.

For what I understand:
Unlike the objects whose positons are based on the background, the GUI's positions are based on the camera.
So when I move the camera to the right, the objects stay in place but the GUI's move along with the camera movements.

I need those GUI's to stay at the same place, like the objects.

The reason is that I need to show the player's and enemy's health (in numbers) and for what I know I can only do this with a GUI using a global variable.

I tried to use an invisible character to "Say" the health points in room_RepExec() but there's that flicker at every "update".

Any ideas (if it's possible) to kind of "lock" the GUI's so that they don't follow the camera movements?

Thanks! :)




#2
Hello, so I've seen this thing around here but I'm not sure about the exact term to search for.

I have four objects that I want to make invisible:

image1
image2
image3
image4


I don't want to write four times image(x).Visible = false;

So I tried this one but it doesn't work, I get an error : undefined token 'image'

Code: ags
int i;
    while (i < 4)
    {
      image[i].Visible = false;
      i+;
    }

Any ideas?
#3
Hi,

This is a suggestion:

I've been in this community for a moment 16 years ago and again, it's amazing how you guys are still rocking and rolling (you're that amazing immortal and invincible internet community paradox, believe me I've been on the web for 30 years and I've seen rises and falls, but not you)

BUT also because of that the thing is that if I search the forums, I can have as first result a post from like 2005 and earlier, which sometimes is still relevant, but mostly not.

Do you think It's possible to make a "latest threads" or something filter? to have the most recent posts show first based on the search?

I'm afraid of dusting off old threads while there are more recent posts about any of my searches, :-D see?

Rik
#4
So I created my custom GUI and to test it I created a Game Load  button.

In the "Events" Tab I added the "btnLoad_OnClick" line in OnClick (I just copy/pasted that)

Now, in-game, on my intro screen, I click on my Load button and the RestoreGame GUI appears. But if I click to close it, it does close but my custom GUI is vanished.
AND also, I can now change the actions with the right click (the mouse icon I set is no more blocked) AND the Icon Bar who was set to invisible is now visible.

I noticed in the "btnLoad_OnClick" script the line : close_owning_gui(control);
So I duplicated it (btnLoad2) and removed the line but yeah, now my GUI is always visible and I can't click anywhere so I undid that after an ALT+F4

Any idea? Thanks!!  :)

Just in case, here the script in "room_load" :

Code: ags
function room_Load()
{
player.Transparency = 100;
//PlayVideo("AGSLogo01.ogv", eVideoSkipEscKey, 1);
//PlayVideo("EONIRIALogo01.ogv",eVideoSkipEscKey, 1);
//start_chan = aIntro01.Play();
//start_chan.Volume = 100;
gIconbar.Visible = false;
gStatusline.Visible = false;
mouse.ChangeModeGraphic(mouse.Mode, 2061);
gGui1.Visible = true;
}
#5
So! I need to say this one.

Back in 2004 I made my very first AGS game and I had great support during development and even some people who took their time to test it before release.
It was the first episode but it never got further because of life back then.

16 years and a lot of Life adventures later, I'm back wanting to make a game again, after exploring a lot of other worlds I always had the AGS software and community in some place in my head.
So yeah, I have no more ambition anymore other than having fun working on a game and hoping you'll have fun playing it one day. I have a full time job, a wife, and side jobs in movie editing.

But there are those two things that made me go like "Wow" right now :

This is still very much a thing after 16 years (for me) and may I say with all my experiences and adventures that it is absolutely astonishing and inspiring as a human. I've seen softwares and their communities rise and fall, but yet here you are AGS, defying everything including the odds. And time.
I came back and my first post was a selfish question of me for my game, and there you were, answering and helping faster than I got my burger last time.

And then, just out of the blue, I googled the name of my game I released back in 2004... and I found it! In that one thing called the AGS archives! And as a downloadable file stored on the web.
Oh boy, it's so old I have to reinstall it every time I want to play with it just to have the music and the sounds... and did I got stuck in my own puzzles I created back then!

So yeah, you all, the AGS community are one of a kind you maybe don't even realize but I say to you for what it's worth after all my journeys : You are Magic.
And you, Chris Jones, made it all happen.
And you people who stepped in to make it still alive in 2020, thank you.

Thank you all   :)


Rik



#6
Hello,

I downloaded AGS, started with the tutorials and manual, so you know that if I bother you guys with my questions, it's because I've been searching amongst the forums,manual,tutorials I could find without finding an answer to my problems.
I'm not much of a scripting guy, I think I get the "logic" of it, I understand "if","else" and other stuff so far, but there are a lot of things that my mind don't really get... right now  ::)

When I read the forums, you guys explain things to one another as if everyone knows what it is all about, but for me it's like reading a foreign language..  ???

The other thing is that many forum topics and other scripting tutorials seem to be outdated due to the new version, our with a broken link, also...

So I don't want to take too much of your time; I know you have other things to do... I just need a little (clear) push here and there, and I'll sort the rest out myself.  ;)
I'll keep all my annoying question in this topic.
Please keep in mind I'm not a scripter.. yet... so please use a language I understand  :-[

Well here goes my first little problem:

1/  - I create a global variable named "health" as "int" and give it "10" points.
     - In the room, I put "Health +=1;" and I get "Parse error unexpected 'Health'"
     - So I try "import Health;" and I get "Expected variable or function after import, not health"
     - So I try "import int Health;" and I get "Variable 'Health' is already defined"

2/ - I want this variable to be shown in the GUI. Believe me I've been searching and testing around for hours.
    - I tried text boxes, labels, globalints and whatever , tried to understand how the @score@ can work if it's not looking for a variable names score,
      wich I can find nowhere, I thought @variable@ would just display the value of that variable in the gui ...?
    - The only thing I found was to create a button that, when you click on it, would display that variable, but that's not what I want.

Well, any help would be greatly appreciated and thanks in advance for your precious time!

;D Rik


         
SMF spam blocked by CleanTalk