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 - luca.94.gallo

Pages: [1]
1
General / Re: Project_battleship: question about events
« on: March 24, 2016, 10:23:26 am »
What do you need help with exactly? We won't just write the code for you. ;)

You basically just have to save the buttons that have been pressed and check them when you click on a slot or so.

Of course you won't and I don't want you to do it  ;)
I don't know how to "save" this buttons! I tried with nested if statements in the window.pollEvent but I think it does not work like that!

2
General / Project_battleship: question about events
« on: March 24, 2016, 09:52:24 am »
Hi everyone, I'm new in this community!  :)

With a group of friends I'm trying to make a game for an exam. We are projecting battleship and my task is to mange graphics and the main.
I want to set a combination of key which determines an action. For example, if the player presses, in this order, F1, H and then he presses the left button on a chessboard he will place a ship named F1, horizontally in the slot chosen with the click.

I tried to do that many times but I failed!  ::)

Can you help me?  ;D

Pages: [1]
anything