Welcome, Guest. Please login or register. Did you miss your activation email?

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.


Messages - MadTrial

Pages: [1]
1
General / Re: help with puzzle game
« on: December 01, 2012, 07:13:19 pm »
thanks for your reply, i have just modify my post :)

here is my screenshoot.


when i click (hold) box numb 3 or 7, it's moved to the empty one(grey box), but when i release my click, thats box (3or 7) goes back to the first position.
it's only happen when the empty one in that position.

did you understand? if you dont, you may download the debug file here : https://dl.dropbox.com/u/26863830/forum/Debug.rar
it's explain everything.

2
General / help with puzzle game
« on: December 01, 2012, 05:32:44 pm »
Hi, i'm new with sfml, and i'm getting some problem in my first game, hope there is someone to help me.

I'm going to create some kind of puzzle games, but the game not going as i wanted, there's something wrong in my code, when i click on my sprite, it's moved to different possition as i want, but don't know why its going back to the same position after some milisecond, but when i delete "Area[temp]=Area[GetMouseClick()];" its moved, but its only worked when we click the sprite that hasn't clicked before. [note : it's only happen when the empty space is at right bottom corner]

this is my code :
            if (GetMouseClick() && moveAble(GetMouseClick()))
            {
                temp=0;
                while (!isAreaEmpty(temp))
                    ++temp;
                piece[Area[GetMouseClick()]].SetPosition(GetCord(temp));
                Area[temp]=Area[GetMouseClick()];
                Area[GetMouseClick()]=0;
            }
        }

 

there is no error appears on my compiler, and i'm using SFML 1.6 on Code::Blocks 10.05
Quote
sorry for my bad english :)


Pages: [1]