1 / 13

Game Programming Step-17

Game Programming Step-17. Learn control mouse player into Game. http://www.prasansoft.com. Purpose Step 17. Learn control mouse player into Game. http://www.prasansoft.com. Components in the same folder in Step-17. http://www.prasansoft.com. Write Command in Step-17.

cain
Télécharger la présentation

Game Programming Step-17

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Game Programming Step-17 Learn control mouse player into Game http://www.prasansoft.com

  2. PurposeStep 17 • Learn control mouse player into Game http://www.prasansoft.com

  3. Components in the same folderin Step-17 http://www.prasansoft.com

  4. Write Command in Step-17 YROTATE CAMERA 0,WRAPVALUE(CAMERA ANGLE Y()+MOUSEMOVEX()*0.2) XROTATE CAMERA 0,WRAPVALUE(CAMERA ANGLE X()+MOUSEMOVEY()*0.2) UPX#=CAMERA ANGLE X(0) IF UPX#<=220 AND UPX#>=160 XROTATE CAMERA 0,220 ENDIF IF UPX#>=60 AND UPX#<=150 XROTATE CAMERA 0,60 ENDIF http://www.prasansoft.com

  5. Write Command in line119-120 http://www.prasansoft.com

  6. YROTATE CAMERA This command will move the camera in the direction it is facing. The step value specifies how far to move the camera and should be a real number. • Syntax • YROTATE CAMERA YAngle • YROTATE CAMERA Camera Number, YAngle • Example • YROTATE CAMERA 0 http://www.prasansoft.com

  7. XROTATE CAMERA This command will rotate the camera around its X axis. The angle value should be a real number. • Syntax • XROTATE CAMERA XAngle • XROTATE CAMERA Camera Number, XAngle • Example • XROTATE CAMERA 0 http://www.prasansoft.com

  8. CAMERA ANGLE Y This command will return the real value Y angle of the camera. • Syntax • Return Float=CAMERA ANGLE Y() • Return Float=CAMERA ANGLE Y(Camera Number) • Example • CAMERA ANGLE Y(0)-3 http://www.prasansoft.com

  9. CAMERA ANGLE X This command will return the real value X angle of the camera. • Syntax • Return Float=CAMERA ANGLE X() • Return Float=CAMERA ANGLE X(Camera Number) • Example • CAMERA ANGLE X() http://www.prasansoft.com

  10. WRAPVALUE This command will return a value that does not exceed the range of 0 to 360. Where a value is specified that exceeds this range, the command will wrap the value around to bring it back within the range. • Syntax • Return Float=WRAPVALUE(Angle Value) • Example • WRAPVALUE(CAMERA ANGLE Y(0)-3) http://www.prasansoft.com

  11. MOUSEMOVEX This command will get the current integer X movement value of the mouse pointer. Instead of the actual mouse position, this command returns the difference between the current mouse X position and the last mouse X position. • Syntax • Return Integer=MOUSEMOVEX() • Example • MOUSEMOVEX()*0.2 http://www.prasansoft.com

  12. MOUSEMOVEY This command will get the current integer Y movement value of the mouse pointer. Instead of the actual mouse position, this command returns the difference between the current mouse Y position and the last mouse Y position. • Syntax • Return Integer=MOUSEMOVEY() • Example • MOUSEMOVEY()*0.2 http://www.prasansoft.com

  13. Result Step-17 http://www.prasansoft.com

More Related