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

#1
Thank you both sincerely.
Seems like I'm always looking in the wrong sections of the manual.
#2
Hello peoples! Here's the latest situation.

I'm trying to create one GUI panel that has many (20+) possible pictures, to do this I tried using
Code: ags
 gExamineIcon.BackgroundGraphic = Picture; 

The name of the GUI button is gExamineIcon and 'Picture' is the variable number of the sprite.

What happens is the computer displays the error: BackgroundGraphic is not a public member of 'Button'. Check spelling.

Please help. I think Roger is laughing at me. :cheesy:
#3
The before fade-in event function did the trick! The GetBackground function will probably come in handy as the game develops.

Once again many thanks. I was bout to give up.
#4
First of all, thanks to you both for the input. It turns out that I reassigned the variable value twice and messed up my own program. (wrong)
I do have another question if you'll bare with me a bit.

I'm using the rooms ability to store 5 backgrounds for animation, but I need a way to lock onto specific backgrounds without animating them. I'm
using the SetBackgoundFrame() function to do this, and it does work but here's the situation:

Each room uses 4 backgrounds and I use a good ole Global variable to keep track of which background the character sees.
So it's like this.

In every room the script assigns a value to global variable FRAME from a calculation.
When the character leaves one room and enter the next there is a SetBackgroundFrame(FRAME) function to show the correct
background.

When the character arrives background no#0 always shows first even with the SetBackgroundFrame(FRAME), then switches to the right frame, and stays there.
I put the SetBackgroundFrame command in a execute_repeatedly function.

Without your help this game will die before it is born. :cry:





#5
I have a Global variable to keep track of money(int Money). But I'm having problems when my character changes rooms.

Let's say my character starts off with $1000 in the global variable, and then find $1000 more. I used the repeatedly_execute function to handle calculations but when I change rooms the money is back to $1000.

The values always revert back to the initial value of the global variable when the room changes despite any adding or subtracting that DID work in the first room.

My local scripts can read a global variable and use it, but how do I change the global variable so that it stays changed globally from various rooms

Thanks, any help appreciated.
SMF spam blocked by CleanTalk