Presentation is loading. Please wait.

Presentation is loading. Please wait.

Game Programming Step-22 Learn Control Enemy walk into Game

Similar presentations


Presentation on theme: "Game Programming Step-22 Learn Control Enemy walk into Game"— Presentation transcript:

1 Game Programming Step-22 Learn Control Enemy walk into Game http://www.prasansoft.com

2 Purpose Step 22 Learn Control Enemy walk into Game http://www.prasansoft.com

3 Components folder in Step-22 http://www.prasansoft.com

4 Write command follow line198-211 http://www.prasansoft.com

5 CAMERA POSITION X This command will return the real value X position of the camera in 3D space. Syntax Return Float=CAMERA POSITION X() Return Float=CAMERA POSITION X(Camera Number) Example PLAYER_X#=CAMERA POSITION X(0) http://www.prasansoft.com

6 CAMERA POSITION Y This command will return the real value Y position of the camera in 3D space. Syntax Return Float=CAMERA POSITION Y() Return Float=CAMERA POSITION Y(Camera Number) Example PLAYER_Y#=CAMERA POSITION Y(0) http://www.prasansoft.com

7 CAMERA POSITION Z This command will return the real value Z position of the camera in 3D space. Syntax Return Float=CAMERA POSITION Z() Return Float=CAMERA POSITION Z(Camera Number) Example PLAYER_Z#=CAMERA POSITION Z(0) http://www.prasansoft.com

8 GET GROUND HEIGHT This command will calculate and return the Y coordinate within the matrix given the X and Z coordinates. This command can be used to allows 3D objects to traverse the contours of any matrix landscape with ease. The matrix number should be an integer value. Syntax Return Float=GET GROUND HEIGHT(Matrix Number, X, Z) Example PLAYER_H#=GET GROUND HEIGHT(1,PLAYER_X#,PLAYER_Z#) http://www.prasansoft.com

9 POSITION CAMERA This command will set the position of the camera in 3D space. The coordinates should be real numbers. Syntax POSITION CAMERA X, Y, Z POSITION CAMERA Camera Number, X, Y, Z POSITION CAMERA Camera Number, Vector Example POSITION CAMERA 0,PLAYER_X#,180+PLAYER_H#,PLAYER_Z# http://www.prasansoft.com

10 POSITION CAMERA This command will set the position of the camera in 3D space. The coordinates should be real numbers. Syntax POSITION CAMERA X, Y, Z POSITION CAMERA Camera Number, X, Y, Z POSITION CAMERA Camera Number, Vector Example POSITION CAMERA 0,PLAYER_X#,180+PLAYER_H#,PLAYER_Z# http://www.prasansoft.com

11 OBJECT POSITION X This command will return a real value X position of the specified 3D object in 3D space. The parameter should be specified using an integer value. Syntax Return Float=OBJECT POSITION X(Object Number) Example SATAN_X#=OBJECT POSITION X(SATAN1) http://www.prasansoft.com

12 OBJECT POSITION Y This command will return a real value Y position of the specified 3D object in 3D space. The parameter should be specified using an integer value. Syntax Return Float=OBJECT POSITION Y(Object Number) Example SATAN_Y#=OBJECT POSITION Y(SATAN1) http://www.prasansoft.com

13 OBJECT POSITION Z This command will return a real value Z position of the specified 3D object in 3D space. The parameter should be specified using an integer value. Syntax Return Float=OBJECT POSITION Z(Object Number) Example SATAN_Z#=OBJECT POSITION Z(SATAN1) http://www.prasansoft.com

14 Write command follow line215-222 http://www.prasansoft.com

15 SQRT This command will return the square root of a value. The value can be an integer or real number. The return value will be a real number. Syntax Return Float=SQRT(Value) Example RANGE#=SQRT((PLAYER_X#-SATAN_X#)^2+(PLAYER_Y#SATAN_Y#)^2 +(PLAYER_Z#-SATAN_Z#)^2) http://www.prasansoft.com

16 LOOP OBJECT This command will play and loop the animation data contained within the specified 3D object from the beginning. You can optionally play and loop the animation by providing a specified start and end frame. Syntax LOOP OBJECT Object Number LOOP OBJECT Object Number, Start Frame LOOP OBJECT Object Number, Start Frame, End Frame Example LOOP OBJECT SATAN1,5,25 http://www.prasansoft.com

17 POINT OBJECT This command will point the specified 3D object towards a point in 3D space. The command sets the current direction of the object to face towards this point in space. The object number should be specified using an integer value. Syntax POINT OBJECT Object Number, X, Y, Z Example POINT OBJECT SATAN1,PLAYER_X#,SATAN_Y#,PLAYER_Z# http://www.prasansoft.com

18 MOVE OBJECT This command will move the specified 3D object in 3D space. The command uses the current direction of the object and moves it using the specified step value. In order to see your 3D object, Syntax MOVE OBJECT Object Number, Speed Example MOVE OBJECT SATAN1,3 http://www.prasansoft.com

19 Result Step-22 http://www.prasansoft.com


Download ppt "Game Programming Step-22 Learn Control Enemy walk into Game"

Similar presentations


Ads by Google