Game Programming Step-13 Learn to Load model gun into Game .
-
Upload
ashlee-lynch -
Category
Documents
-
view
218 -
download
0
Transcript of Game Programming Step-13 Learn to Load model gun into Game .
![Page 1: Game Programming Step-13 Learn to Load model gun into Game .](https://reader036.fdocuments.net/reader036/viewer/2022062519/5697c01f1a28abf838cd17fb/html5/thumbnails/1.jpg)
Game Programming Step-13
Learn to Load model gun into Game
http://www.prasansoft.com
![Page 2: Game Programming Step-13 Learn to Load model gun into Game .](https://reader036.fdocuments.net/reader036/viewer/2022062519/5697c01f1a28abf838cd17fb/html5/thumbnails/2.jpg)
Purpose Step 13
• Learn to Load model gun into Game• Learn to Lock model gun to camera
http://www.prasansoft.com
![Page 3: Game Programming Step-13 Learn to Load model gun into Game .](https://reader036.fdocuments.net/reader036/viewer/2022062519/5697c01f1a28abf838cd17fb/html5/thumbnails/3.jpg)
Create Folder “GUN” in Step-13
http://www.prasansoft.com
![Page 4: Game Programming Step-13 Learn to Load model gun into Game .](https://reader036.fdocuments.net/reader036/viewer/2022062519/5697c01f1a28abf838cd17fb/html5/thumbnails/4.jpg)
Keep file “G6.x” in folder “GUN”
http://www.prasansoft.com
![Page 5: Game Programming Step-13 Learn to Load model gun into Game .](https://reader036.fdocuments.net/reader036/viewer/2022062519/5697c01f1a28abf838cd17fb/html5/thumbnails/5.jpg)
Write Command in line 16-21
http://www.prasansoft.com
![Page 6: Game Programming Step-13 Learn to Load model gun into Game .](https://reader036.fdocuments.net/reader036/viewer/2022062519/5697c01f1a28abf838cd17fb/html5/thumbnails/6.jpg)
GUN=201
This command define variable name GUN
And assign value to 201 Is not unique in the system.
http://www.prasansoft.com
![Page 7: Game Programming Step-13 Learn to Load model gun into Game .](https://reader036.fdocuments.net/reader036/viewer/2022062519/5697c01f1a28abf838cd17fb/html5/thumbnails/7.jpg)
LOAD OBJECT
This command loads a model into the specified 3D object number.
You must specify a model in the X, 3DS, MDL, MD2 or MD3 format.
• Syntax • LOAD OBJECT Filename, Object Number• LOAD OBJECT Filename, Object Number, Texture Mode
• Example• LOAD OBJECT “GUN\G6.X",GUN
http://www.prasansoft.com
![Page 8: Game Programming Step-13 Learn to Load model gun into Game .](https://reader036.fdocuments.net/reader036/viewer/2022062519/5697c01f1a28abf838cd17fb/html5/thumbnails/8.jpg)
LOCK OBJECT ON
This command will lock the specified 3D object to the screen. A locked
object will be positioned as though the camera had never been altered
from its default orientation.
• Syntax • LOCK OBJECT ON Object Number
• Example• LOCK OBJECT ON GUN
http://www.prasansoft.com
![Page 9: Game Programming Step-13 Learn to Load model gun into Game .](https://reader036.fdocuments.net/reader036/viewer/2022062519/5697c01f1a28abf838cd17fb/html5/thumbnails/9.jpg)
SCALE OBJECT
This command will scale the specified 3D object to stretch or shrink in all
three dimensions, using percentage scale values.
• Syntax • SCALE OBJECT Object Number, XSize, YSize, ZSize
• Example
• SCALE OBJECT SATAN,600,600,600
http://www.prasansoft.com
![Page 10: Game Programming Step-13 Learn to Load model gun into Game .](https://reader036.fdocuments.net/reader036/viewer/2022062519/5697c01f1a28abf838cd17fb/html5/thumbnails/10.jpg)
SCALE OBJECT
This command will place the specified 3D object in 3D space.
In order to see your 3D object.
• Syntax • POSITION OBJECT Object Number, X, Y, Z
• Example• POSITION OBJECT SATAN,1400,0,2000
http://www.prasansoft.com
![Page 11: Game Programming Step-13 Learn to Load model gun into Game .](https://reader036.fdocuments.net/reader036/viewer/2022062519/5697c01f1a28abf838cd17fb/html5/thumbnails/11.jpg)
SET OBJECT LIGHT
This command will set the light state of the specified object.
• Syntax • SET OBJECT LIGHT Object Number, Flag
• Example• SET OBJECT LIGHT SATAN,2
http://www.prasansoft.com
![Page 12: Game Programming Step-13 Learn to Load model gun into Game .](https://reader036.fdocuments.net/reader036/viewer/2022062519/5697c01f1a28abf838cd17fb/html5/thumbnails/12.jpg)
YROTATE OBJECT
This command will rotate the specified 3D object around the Y axis dimension.
The object number should be specified using an integer value.
• Syntax • YROTATE OBJECT Object Number, YAngle
• Example• YROTATE OBJECT GUN,270
http://www.prasansoft.com
![Page 13: Game Programming Step-13 Learn to Load model gun into Game .](https://reader036.fdocuments.net/reader036/viewer/2022062519/5697c01f1a28abf838cd17fb/html5/thumbnails/13.jpg)
Result Step-13
http://www.prasansoft.com