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?
SMF spam blocked by CleanTalk