I know that the if command is Something like this-
if ( );{
dbMoveObject ( 2 );}
Ok now here is my program-
// Dark GDK - The Game Creators - www.thegamecreators.com
// the wizard has created a very simple project that uses Dark GDK
// it contains the basic code for a GDK application
// whenever using Dark GDK you must ensure you include the header file
#include "DarkGDK.h"
#include "SC_Collision.h"
#include "inputkeys.h"
// the main entry point for the application is this function
void DarkGDK ( void )
{
// turn on sync rate and set maximum rate to 60 fps
dbSyncOn ( );
dbSyncRate ( 60 );
dbLoadImage ( "map.jpg", 1 );
dbLoadImage ( "map.jpg", 2 );
dbSetCameraRange ( 1.0f, 3000000.0f );
SC_Start ( );
dbSetupTerrain ( );
dbMakeObjectTerrain ( 1 );
dbSetTerrainHeightMap ( 1, "map.jpg" );
dbSetTerrainScale ( 1, 2.0f, 0.6f, 2.0f );
dbSetTerrainTexture ( 1, 1, 2 );
dbSetTerrainLight ( 1, 1.0f, -0.25f, 0.0f, 1.0f, 1.0f, 0.78f, 0.5f );
dbBuildTerrain ( 1 );
dbMakeLight ( 6 );
dbSetLightRange ( 6, 10 );
dbMakeObjectSphere ( 4, 10 );
dbPositionCamera ( 385, 23, 100 );
dbPositionCamera (500, 11, 452 );
dbMakeCamera ( 3 );
dbSetCameraView ( 3, 0, 0, 100, 100 );
SC_SetupObject ( 4, 8, 1 );
SC_SetupComplexObject ( 1, 7, 250000 );
// our main loop
while ( LoopGDK ( ) )
{
if ( SC_ObjectCollision ( 4, 1 ) == 1 );{
if ( dbDownKey ( ) == 1 );{
dbMoveCamera ( -1.5f );}
}
if not ( SC_ObjectCollision ( 4, 1 ) == 1 );{
if ( dbUpKey ( ) == 1 );{
dbMoveCamera ( 1.5 );}
if ( dbRightKey ( ) == 1 );{
dbTurnCameraRight ( 2 );}
if ( dbLeftKey ( ) == 1 );{
dbTurnCameraLeft ( 2 );}
dbPositionCamera ( 3, dbCameraPositionX ( 0 ), 350.0f, dbCameraPositionZ ( 0 ) );
dbRotateCamera ( 3, 90.0f, dbCameraAngleY ( 0 ), 0.0f );
dbPositionObject ( 4, dbCameraPositionX ( 0 ), dbCameraPositionY ( 0 ), dbCameraPositionZ ( 0 ) );
dbPositionLight ( 6, dbCameraPositionX ( 0 ), dbCameraPositionY ( 0 ), dbCameraPositionZ ( 0 ) );
dbUpdateTerrain ( );
// update the screen
dbSync ( );
}
// return back to windows
return;
}
It is a little messy, but it is a work in progres-
So, here is the problem-- I have been working with python along with c++ nd in python there is an else command which means that if the if doesn't happen, you do this.
Also in Python there is a not command that means if something isn't like that-- do this.
My question is are there commands like that in c++? I tried them- they didn't work......