Search found 41 matches

by TheCollector
August 2nd, 2019, 6:54 pm
Forum: Everything
Topic: How to move 2 images w/the arrow keys, 1 working only while the alt key is held in combin. with an arrow key, the oth...
Replies: 13
Views: 4915

Re: How to move 2 images w/the arrow keys, 1 working only while the alt key is held in combin. with an arrow key, the ot

Figured it out using step-over in the debugger. Ended up adding an else statement to put the focus back on the reticle if the boat is not in use.
by TheCollector
August 2nd, 2019, 6:33 pm
Forum: Everything
Topic: How to move 2 images w/the arrow keys, 1 working only while the alt key is held in combin. with an arrow key, the oth...
Replies: 13
Views: 4915

Re: How to move 2 images w/the arrow keys, 1 working only while the alt key is held in combin. with an arrow key, the ot

Finishing with tutorial 4.3 and the velocity fix (with the else statements) messed it up a bit. For some reason now, when you press escape while boatisinitiated it doesn't put the focus back on the cross-hair. It was doing it before I changed the code so that the velocity doesn't increase with each ...
by TheCollector
August 2nd, 2019, 5:56 pm
Forum: Everything
Topic: How to move 2 images w/the arrow keys, 1 working only while the alt key is held in combin. with an arrow key, the oth...
Replies: 13
Views: 4915

Re: How to move 2 images w/the arrow keys, 1 working only while the alt key is held in combin. with an arrow key, the ot

Okay, I figured it out with some trial and error. Cannot use the return key for both. Set it so that when you hit escape while the boat is initiated it initiates the cross-hair. That works.
by TheCollector
August 2nd, 2019, 5:42 pm
Forum: Everything
Topic: How to move 2 images w/the arrow keys, 1 working only while the alt key is held in combin. with an arrow key, the oth...
Replies: 13
Views: 4915

Re: How to move 2 images w/the arrow keys, 1 working only while the alt key is held in combin. with an arrow key, the ot

I figured out that if I set the cross-hair to only move when the escape key is held and the boat only when the enter key is held they won't move each other. But that's not the way I wanted to do it. Ideally, I'd like the cross-hair to be true when the game starts and toggle between the two when the ...
by TheCollector
August 2nd, 2019, 5:07 pm
Forum: Everything
Topic: How to move 2 images w/the arrow keys, 1 working only while the alt key is held in combin. with an arrow key, the oth...
Replies: 13
Views: 4915

Re: How to move 2 images w/the arrow keys, 1 working only while the alt key is held in combin. with an arrow key, the ot

Here's the updated code (I've set CrossHairIsInitiated to true in the header file so you start with being able to move the cross-hair): void Game::UpdateModel() { if (CrossHairIsInitiated) { BoatIsInitiated = false; //Move reticle up if (wnd.kbd.KeyIsPressed(VK_UP)) { chy = chy - 3; } //Move reticle...
by TheCollector
August 2nd, 2019, 4:50 pm
Forum: Everything
Topic: How to move 2 images w/the arrow keys, 1 working only while the alt key is held in combin. with an arrow key, the oth...
Replies: 13
Views: 4915

Re: How to move 2 images w/the arrow keys, 1 working only while the alt key is held in combin. with an arrow key, the ot

So, I tried changing it from being the alt-key to the enter key to make the bool become true. For some reason the alt key would bring me to the window menu instead of doing what I programmed it to do. Only problem now is that both the cross-hair and the boat move when you hold the enter key and pres...
by TheCollector
August 2nd, 2019, 4:23 pm
Forum: Everything
Topic: How to move 2 images w/the arrow keys, 1 working only while the alt key is held in combin. with an arrow key, the oth...
Replies: 13
Views: 4915

Re: How to move 2 images w/the arrow keys, 1 working only while the alt key is held in combin. with an arrow key, the ot

Fixed the error and now the cross-hair at least works again. Only problem is I can't make secondary use of the arrow keys by holding down the alt-key with the code I have in there. Any idea how to go about this? I thought this would take care of it: BoatIsInitiated = wnd.kbd.KeyIsPressed(VK_MENU); i...