Computer Science Canada Zooming for a Scope!!!! HELP NEEDED |
Author: | B-Man 31 [ Sat Jan 03, 2009 12:43 pm ] | ||
Post subject: | Zooming for a Scope!!!! HELP NEEDED | ||
I am making a FPS type shooter for my ISU and i cant seem to get the scoping down., what i am trying to do is that when you click the right mouse button the background will zoom in by 2 or 3 times the size (haven't decided that yet). i have it zooming but i cant get the cross hair to stay in the same position. By that i mean that when i zoom with the cross hair in the middle, once the background has been enlarged, the cross hair is not in the middle any more. It would be greatly appreciated if i could get some help with this. thank you here is the code and i also attached the turing file with the BG picture
|
Author: | BigBear [ Sun Mar 01, 2009 11:09 am ] | ||
Post subject: | Re: Zooming for a Scope!!!! HELP NEEDED | ||
I think I see what you mean if your mouse is not inside the rectangle and you zoom in it becomes inside the rectangle. I was able to put it in the middle and zoom in and zoom out and it would stay the same. Also I think you should have it so when your cross hair is in the rectangle it no longer tries to scroll the screen, so you put the mouse on the spot more or less making it easier to aim. You should put your cross hair after you check if their are zoomed in and which picture to draw. I added
before the View.Update thinking you didn't have a cross hair. |
Author: | Lekegolo killer [ Mon Mar 02, 2009 12:08 pm ] |
Post subject: | Re: Zooming for a Scope!!!! HELP NEEDED |
i think you have it set to center on the center of the image when you zoom... TURING %%bgzX and bgzY are the zoomed background X and Y bgzX := ((maxx - Pic.Width (bg)) div 2) * 3 bgzY := ((maxy - Pic.Height (bg)) div 2) * 3 Pic.Draw (bg, bgX, bgY, picCopy) when you should be having it zoom on the mouse curser? i could be completely wrong but... TURING bgzX := ((maxx - Pic.Width (bg)) div 2) * 3 bgzY := ((maxy - Pic.Height (bg)) div 2) * 3 Pic.Draw (bg, mousex, mouseY, picCopy) sumthing like that i think (that's not the actual coding obviusly i am to nub to know how you would do this, probably another variable or mouse.where or whateva). |