Hi, i am working on a FPS and i have the basics done ( Collision, gravity, guns, ammo,lives, level) But now i am on to Multiplayer and A Online Leveling system. So the question im asking is this, how do you transfer data to a remote location? Should the data be taken from a string and put into a text file? And also how do i send the file up while reading other files on the same server? I was trying to use FTP but i couldnt find any good (free) solutions, i dont have a budget so i cant afford to buy expensive solutions.
Current Game Source =
CODE
#include "DarkGDK.h"
#include "SC_Collision.h"
#include <ctime>
#include "Wininet.h"
//#include "aehandle.h"
int collide = 0;
int pause = 0;
float enemymove = 0.2;
int ammo = 700;
int random = rand();
int norm = 0;
int scopeon = 0;
int scoped = 0;
int nextshot = 0;
float world = 0;
int score = 0;
int gameover = 0;
int lives = 10;
int guntype = 0;
int J = 2;
int allloaded = 0;
int E = 0;
int level = 1;
int spawn2 = 0;
float statue = 300.0f;
int running = 1;
float fuel100 = 5.0f;
float fuel101 = 5.0f;
float fuel102 = 5.0f;
float fuel103 = 5.0f;
float fuel126 = 5.0f;
float fuel127 = 5.0f;
float fuel128 = 5.0f;
float fuel129 = 5.0f;
int allreadysetup = 0;
float fuel = 100.0f;
float flashbang = 0.5f;
int numSpheres = 5;
float radius = 7.0f;
float littleRadius = 2.0f;
int rtimer = 0;
int ran = 0;
int stimer = 10;
int vtimer = 0;
float wlevel = 0;
float gravity = -0.1f;
float slope = 0.5f;
int ground = 1;
int jumptimer = 0;
int syncmode = 60;
int view = 0;
int hide = 0;
//player movement vector
float vx = 0;
float vy = 0;
float vz = 0;
void userInput ( void );
void refreshammo ()
{
ammo = 700;
}
void makeLevel()
{
//dbLoadObject( "level.x",1 );
//SC_SetupComplexObject( 1,1,2 );
if (world == 11)
{
dbLoadObject ("build3.x",4922);
dbPositionObject (4922,100,5,100);
SC_SetupComplexObject ( 4922,1,2);
dbLoadObject ("build3.x",4923);
dbPositionObject (4923,600,5,100);
SC_SetupComplexObject ( 4923,1,2);
dbLoadObject ("build3.x",4924);
dbPositionObject (4924,1100,5,100);
SC_SetupComplexObject ( 4924,1,2);
dbLoadObject ("ctower.x",4925);
dbPositionObject (4925,600,100,100);
SC_SetupComplexObject ( 4925,1,2);
dbLoadObject ("bunker.x",4926);
dbPositionObject (4926,59,5,827);
SC_SetupComplexObject ( 4926,1,2);
dbLoadObject ("wtower.x",4927);
dbPositionObject (4927,636,5,658);
SC_SetupComplexObject ( 4927,1,2);
dbLoadObject ("wtower.x",4928);
dbPositionObject (4928,636,5,958);
SC_SetupComplexObject ( 4928,1,2);
dbLoadObject ("build1.x",4929);
dbPositionObject (4929,987,5,670);
SC_SetupObject ( 4929,1,2);
dbLoadObject ("build1.x",4930);
dbPositionObject (4930,1000,5,670);
SC_SetupObject ( 4930,1,2);
dbLoadObject ("build1.x",4931);
dbPositionObject (4931,987,5,700);
SC_SetupObject ( 4931,1,2);
dbMakeObjectBox ( 4933, 900,20,20);
dbPositionObject (4933,59,20,427);
dbLoadImage ( "cmmdmtal.bmp", 4933);
dbTextureObject ( 4933,4933);
SC_SetupObject ( 4933,1,2);
SC_UpdateObject ( 4933 );
dbMakeObjectBox ( 4934, 900,20,20);
dbPositionObject (4934,509,212,261);
dbLoadImage ( "fsbrik.bmp", 4934);
dbTextureObject ( 4934,4934);
SC_SetupObject ( 4934,1,2);
SC_UpdateObject ( 4934 );
}
if (world == 12)
{
dbLoadObject ("CASTLE1.x",4928);
dbPositionObject (4928,100,100,100);
dbRotateObject(4928,90,90,90);
dbScaleObject(4928,10000,10000,10000);
SC_SetupComplexObject ( 4928,1,2);
}
if (world == 0)
{
dbMakeObjectBox ( 456, 8,2,2);
dbPositionObject ( 456, 600,3,550);
SC_SetupObject (456,1,2);
dbHideObject ( 456 );
dbLoadObject ("H-MP5-Static.x",1234567);
dbPositionObject ( 1234567, 600,3,550);
dbScaleObject ( 1234567, 1000,1000,1000);
}
else
{
if (world == 11)
{
dbMakeObjectBox ( 456, 8,2,2);
dbPositionObject ( 456, 536,58,436);
SC_SetupObject (456,1,2);
dbHideObject ( 456 );
dbLoadObject ("H-MP5-Static.x",1234567);
dbPositionObject ( 1234567, 536,58,436);
dbScaleObject ( 1234567, 1000,1000,1000);
}
}
if (world == 0)
{
dbMakeObjectBox ( 457, 8,2,2);
dbPositionObject ( 457, 396,2,697);
SC_SetupObject (457,1,2);
dbHideObject ( 457 );
dbLoadObject ("H-AK47-Static.x",789789);
dbPositionObject ( 789789,396,2,697 );
dbScaleObject (789789,1000,1000,1000);
}
else
{
if (world == 11)
{
dbMakeObjectBox ( 457, 8,2,2);
dbPositionObject ( 457, 234,212,199);
SC_SetupObject (457,1,2);
dbHideObject ( 457 );
dbLoadObject ("H-AK47-Static.x",789789);
dbPositionObject ( 789789,234,212,199 );
dbScaleObject (789789,1000,1000,1000);
}
}
if (world == 0)
{
dbMakeObjectBox ( 458, 8,2,2);
dbPositionObject ( 458, 84,55,196);
SC_SetupObject (458,1,2);
dbHideObject(458);
dbLoadObject ("Atomiser.x", 567567);
dbPositionObject (567567,84,55,196);
dbScaleObject ( 567567, 80,20,20);
dbRotateObject ( 567567, -90,0,0);
dbSetObjectLight ( 567567, 0 );
}
else
{
if (world == 11)
{
dbMakeObjectBox ( 458, 8,2,2);
dbPositionObject ( 458, 293,22,783);
SC_SetupObject (458,1,2);
dbHideObject(458);
dbLoadObject ("Atomiser.x", 567567);
dbPositionObject (567567,293,22,783);
dbScaleObject ( 567567, 80,20,20);
dbRotateObject ( 567567, -90,0,0);
dbSetObjectLight ( 567567, 0 );
}
}
if (world == 0)
{
dbMakeObjectBox ( 459, 8,1,1);
dbPositionObject ( 459, 244,125,404);
SC_SetupObject (459,1,2);
dbHideObject(459);
dbLoadObject ("H-Enfield-Static.x", 5675671);
dbPositionObject (5675671,244,120,404);
dbScaleObject ( 5675671, 1000,1000,1000);
//dbRotateObject ( 5675671, -90,0,0);
}
else
{
if (world == 11)
{
dbMakeObjectBox ( 459, 8,1,1);
dbPositionObject ( 459, 513,752,60);
SC_SetupObject (459,1,2);
dbHideObject(459);
dbLoadObject ("H-Enfield-Static.x", 5675671);
dbPositionObject (5675671,513,752,60);
dbScaleObject ( 5675671, 1000,1000,1000);
//dbRotateObject ( 5675671, -90,0,0);
}
}
//dbLoadImage( "1.jpg",1 );
//dbTextureObject( 1,1 );
//add box and sphere to the level
//dbMakeObjectBox( 3,10,20,30 );
//dbPositionObject( 3,-80,30,30 );
//dbRotateObject( 3,(float)dbRnd(360),(float)dbRnd(360),(float)dbRnd(360) );
//SC_SetupObject( 3,1,2 );
//dbMakeObjectSphere( 4,30 );
//dbPositionObject( 4,80,30,30 );
//dbRotateObject( 4,(float)dbRnd(360),(float)dbRnd(360),(float)dbRnd(360) );
//SC_SetupObject( 4,1,1 );
//all level objects are group 1
}
void spawn()
{
if (spawn2 == 0)
{
if (world == 0)
{
dbPositionObject (2, 100, 700, 100);
}
else
{
if ( world == 11)
{
dbPositionObject (2, 600,1000,100);
}
}
spawn2 = 1;
}
else
{
if (spawn2 == 1)
{
dbPositionObject (2, 510, 300, 740 );
spawn2 = 2;
}
else
{
if (spawn2 == 2)
{
dbPositionObject (2,220,400,334);
spawn2 = 0;
}
else
{
if (spawn2 == 3)
{
dbPositionObject (2,510,1000,302);
spawn2 = 2;
}
}
}
}
}
void makePlayer()
{
refreshammo();
dbMakeObjectSphere( 2,radius*1.0f );
//dbLoadObject ("Bezerker.x", 2);
if (wlevel == 0)
{
dbPositionObject( 2,90,215,220 );
}
if (wlevel == 2 )
{
dbPositionObject ( 2, 434, 42, -517 );
}
dbColorObject (2, dbRGB ( 487,900,300));
SC_SetupObject( 2,0,1 );
spawn ();
if (allreadysetup == 0)
{
if (wlevel == 2 )
{
}
if (wlevel == 0 )
{
dbLoadObject ( "New Statue.x", 789 );
//dbLoadObject ( "ColZ.x", 7765 );
dbPositionObject ( 789, 500, 0, 400 );
dbRotateObject (789, -90, 0, 0);
SC_SetupComplexObject ( 789,1,2 );
//dbPositionObject ( 7765, 600,0,400 );
//dbRotateObject ( 7765, -90, 0, 0 );
//SC_SetupObject ( 7765, 1, 2 );
allreadysetup = allreadysetup + 1;
}
}
//player has no group
}
void makeEnemy129()
{
dbLoadObject("H-Alien Psionic-Static.x",895);
//dbColorObject (101, dbRGB (234, 345, 654));
//SC_SetupObject (101, 0, 1);
dbPositionObject (895,200,20,600);
dbScaleObject(895,200,400,200);
dbMakeObjectBox (129,3,9,3);
SC_SetupObject ( 129, 0 ,2 );
dbHideObject ( 129 );
dbPositionObject ( 129, 900,-2,600);
SC_UpdateObject( 129 );
}
void makeEnemy128()
{
dbLoadObject("H-Alien Psionic-Static.x",894);
//dbColorObject (101, dbRGB (234, 345, 654));
//SC_SetupObject (101, 0, 1);
dbPositionObject (894,200,20,600);
dbScaleObject(894,200,400,200);
dbMakeObjectBox (128,3,9,3);
SC_SetupObject ( 128, 0 ,2 );
dbHideObject ( 128 );
dbPositionObject (128,800,-2,600);
SC_UpdateObject( 128 );
}
void makeEnemy127()
{
dbLoadObject("H-Alien Psionic-Static.x",893);
//dbColorObject (101, dbRGB (234, 345, 654));
//SC_SetupObject (101, 0, 1);
dbPositionObject (893,200,20,600);
dbScaleObject(893,200,400,200);
dbMakeObjectBox (127,3,9,3);
SC_SetupObject ( 127, 0 ,2 );
dbHideObject ( 127 );
dbPositionObject (127,700,-2,600);
SC_UpdateObject( 127 );
}
void makeEnemy126()
{
dbLoadObject("H-Alien Psionic-Static.x",892);
//dbColorObject (101, dbRGB (234, 345, 654));
//SC_SetupObject (101, 0, 1);
dbPositionObject (892,200,20,600);
dbScaleObject(892,200,400,200);
dbMakeObjectBox (126,3,9,3);
SC_SetupObject ( 126, 0 ,2 );
dbHideObject ( 126 );
dbPositionObject (126,300,-2,600);
SC_UpdateObject( 126 );
}
void makeEnemy102()
{
dbLoadObject("H-Alien Psionic-Static.x",891);
//dbColorObject (101, dbRGB (234, 345, 654));
//SC_SetupObject (101, 0, 1);
dbPositionObject (891,200,20,600);
dbScaleObject(891,200,400,200);
dbMakeObjectBox (102,3,9,3);
SC_SetupObject ( 102, 0 ,2 );
dbHideObject ( 102 );
dbPositionObject (102,100,-3,600);
SC_UpdateObject( 102 );
}
void makeEnemy101()
{
dbLoadObject("H-Alien Psionic-Static.x",890);
//dbColorObject (101, dbRGB (234, 345, 654));
//SC_SetupObject (101, 0, 1);
dbPositionObject (890,200,20,600);
dbScaleObject(890,200,400,200);
dbMakeObjectBox (101,3,9,3);
dbPositionObject(101,200,-2,600);
SC_SetupObject ( 101, 0 ,2 );
dbHideObject ( 101 );
SC_UpdateObject( 101 );
}
void makeExtraSpheres( int num )
{
for( int i = 10; i < 10 + num; i++ )
{
dbMakeObjectSphere( i,littleRadius*2.0f );
dbPositionObject( i,(float)dbRnd(50)-25,(float)dbRnd(50)+100,(float)dbRnd(50)-25 );
dbColorObject( i,dbRgb(dbRnd(255),dbRnd(255),dbRnd(255)) );
SC_SetupObject( i,3,1 );
SC_AllowObjectScaling( i );
}
//extra spheres are group 3
}
void handleExtraSpheres( int num )
{
for( int i = 10; i < 10+num; i++ )
{
//move all the little spheres towards the player and slide them
float oldx = dbObjectPositionX(i);
float oldy = dbObjectPositionY(i);
float oldz = dbObjectPositionZ(i);
dbPointObject( i,dbObjectPositionX(2),dbObjectPositionY(2),dbObjectPositionZ(2) );
dbMoveObject( i,0.5 );
float x = dbObjectPositionX(i);
float y = dbObjectPositionY(i);
float z = dbObjectPositionZ(i);
//little spheres collide with all (0)
int collide = SC_SphereSlide( 0, oldx,oldy,oldz, x,y,z, littleRadius, i );
if ( collide > 0 )
{
dbPositionObject( i, SC_GetCollisionSlideX(),SC_GetCollisionSlideY(),SC_GetCollisionSlideZ() );
}
SC_UpdateObject( i );
}
//show/hide the extra spheres
if ( dbReturnKey() == 1 && rtimer < dbTimer() )
{
rtimer = dbTimer() + 300;
hide = 1 - hide;
if ( hide == 1 )
{
for( int i = 10; i < 10+num; i++ ) dbHideObject( i );
}
else
{
for( int i = 10; i < 10+num; i++ ) dbShowObject( i );
}
}
}
void movePlayer()
{
//rotate player with mouse
dbYRotateObject( 2,dbObjectAngleY(2) + dbMouseMoveX()/3.0f );
dbXRotateObject( 2,dbObjectAngleX(2) + dbMouseMoveY()/3.0f );
float oldx = dbObjectPositionX(2);
float oldy = dbObjectPositionY(2);
float oldz = dbObjectPositionZ(2);
//apply gravity, and user changes to movement
float angy = dbObjectAngleY(2);
vx = 0;
vz = 0;
//if player is jumping or falling then apply 'normal' gravity
//if not attempt to keep the player stuck to the floor
if ( vy == 0 && jumptimer == 0 ) vy = vy + 10*gravity;
else vy = vy + gravity;
if (dbKeyState(32) == 1 ) { vx = vx + dbCos(angy); vz = vz - dbSin(angy); }
if (dbKeyState(30) == 1 ) { vx = vx - dbCos(angy); vz = vz + dbSin(angy); }
if (dbKeyState(31) == 1 ) { vx = vx - dbSin(angy); vz = vz - dbCos(angy); }
if (dbKeyState(17) == 1 ) { vx = vx + dbSin(angy); vz = vz + dbCos(angy); }
//only jump if on ground, and a certain time after last jump
if ( ground == 1 )
{
if ( dbSpaceKey() == 1 && jumptimer == 0 )
{
vy = vy + 3.0f;
jumptimer = 20;
}
}
//this would be the player's final position without collision
float x = oldx + vx;
float y = oldy + vy;
float z = oldz + vz;
//first handle gravity - seperated from horizontal movement
//to achieve a more realistic effect
//Method: simple - cast a sphere vertically down, if it hits the level then
// position the object there (sticky collision) then move
// on to horizontal movement
// more complex - if we were to only use the simple method the player would be
// allowed to climb almost vertical slopes. Alternative is to
// get the normalY direction to work out how flat the gorund
// below the player is, 0-slope# is flatter, slope#-1 is steeper.
// if it's flat, use sticky collision, if it's steep slide the
// player down the slope. Changing slope# determines how steep the
// player can climb. NOTE: this also effects stairs.
int collide = SC_SphereCastGroup( 1, oldx,oldy,oldz, oldx,oldy+vy,oldz, radius,0 );
if ( collide > 0 )
{
if (collide == 456)
{
guntype = 2;
refreshammo();
}
if (collide == 457)
{
guntype = 1;
refreshammo();
}
if (collide == 458)
{
guntype = 0;
refreshammo();
}
if (collide == 459)
{
guntype = 3;
refreshammo();
}
//how flat is this ground
float ny = SC_GetCollisionNormalY();
if ( dbAbs(ny) > slope )
{
//FLAT, stick
oldy = SC_GetStaticCollisionY();
}
else
{
//STEEP, slide
x = x - oldx; z = z - oldz;
oldx = SC_GetCollisionSlideX();
oldy = SC_GetCollisionSlideY();
oldz = SC_GetCollisionSlideZ();
x = x + oldx; z = z + oldz;
}
//ny#<0 means the player has hit a ceiling rather than a floor
if ( ny > slope )
{
//only on ground if standing on flat ground
ground = 1;
vy = 0;
}
else
{
ground = 0;
//if player has hit a flat ceiling then stop vy# movement
if ( ny < -slope ) vy = gravity;
}
}
else
{
//nothing below player, not on ground, add vertical speed to player
oldy = oldy + vy;
ground = 0;
}
//jumptimer will decrease only when player is back on ground
//creates a pause between two successive jumps
if ( ground == 1 && jumptimer > 0 ) jumptimer--;
//handle horizontal movement as sliding
//player only collides with group 1 (level) objs and moves freely through others
collide = SC_SphereSlideGroup( 1, oldx,oldy,oldz, x,oldy,z, radius,0 );
if ( collide > 0 )
{
//if hit, reposition player, halt movement vector
x = SC_GetCollisionSlideX();
oldy = SC_GetCollisionSlideY();
z = SC_GetCollisionSlideZ();
vx = 0;
vz = 0;
//possible code for giving the player a jumping help up stairs...
//might be useful if slope# is set very high but stairs are still required
//dy = oldy - SC_GetStaticCollisionY()
//if ( dy < slope && dy > 0 && ground == 1 ) vy = 0.5;
}
//position the player
dbPositionObject( 2,x,oldy,z );
//dbRotateObject (2, 90,90,90);
SC_UpdateObject( 2 );
}
void positionCameraToObject( int obj, int thirdPerson)
{
dbPositionCamera( dbObjectPositionX(2) + 9,dbObjectPositionY(2),dbObjectPositionZ(2) );
dbRotateCamera( dbObjectAngleX(2),dbObjectAngleY(2),dbObjectAngleZ(2) );
if ( thirdPerson == 1 )
{
dbPitchCameraDown( 10 );
dbMoveCamera( -30 );
}
}
void aehandle ()
{
char* szKey = dbInKey ( );
//handle shooting
if ( strcmp ( szKey, "f" ) == 0)
{
if (ammo == 0)
{
dbText (300,300,"Your out of Ammo! Pick up a gun to get more!");
}
else
{
dbShowObject ( 11 );
ammo = ammo - 1;
//get our collision vector
float oldx = dbCameraPositionX();
float oldy = dbCameraPositionY();
float oldz = dbCameraPositionZ();
dbMoveCamera( 200 );
float x = dbCameraPositionX();
float y = dbCameraPositionY();
float z = dbCameraPositionZ();
dbMoveCamera( -200 );
collide = SC_RayCast( 0, oldx,oldy,oldz, x,y,z, 0 );
if ( collide > 0 )
{
//get the collision point
float newx = SC_GetStaticCollisionX();
float newy = SC_GetStaticCollisionY();
float newz = SC_GetStaticCollisionZ();
//get collision normal
float normx = SC_GetCollisionNormalX();
float normy = SC_GetCollisionNormalY();
float normz = SC_GetCollisionNormalZ();
//position and point a marker in the right direction
dbPositionObject( 501, newx + normx/100.0f, newy + normy/100.0f, newz + normz/100.0f );
dbPointObject( 501, newx + normx, newy + normy, newz + normz );
if (collide == 1)
{
dbHideObject ( 501 );
dbHideObject ( 503 );
}
else
{
dbShowObject( 501 );
dbShowObject ( 503 );
}
}
}
}
//enemy two
if (running == 1)
{
for (int s=1; s < 10; s++)
{
float oldx = dbObjectPositionX(101);
float oldy = dbObjectPositionY(101);
float oldz = dbObjectPositionZ(101);
dbPointObject( 101,dbObjectPositionX(J),dbObjectPositionY(J),dbObjectPositionZ(J) );
dbMoveObject (101, enemymove);
float x = dbObjectPositionX(101);
float y = dbObjectPositionY(101);
float z = dbObjectPositionZ(101);
//SC_UpdateObject (123);
int brittany= SC_SphereSlide( 0, oldx,oldy,oldz, x,y,z, littleRadius, 101 );
if ( brittany > 0 )
{
if (world == 11)
{
}
else
{
dbPositionObject( 101, SC_GetCollisionSlideX(),SC_GetCollisionSlideY(),SC_GetCollisionSlideZ() );
}
}
if ( brittany == 2)
{
fuel = fuel - 20;
fuel101 = 0.0f;
}
SC_UpdateObject( 101 );
}
}
if (collide == 101)
{
fuel101 = fuel101 - 5.0f;
collide = 0;
}
if (fuel101 == 0.0f)
{
makeEnemy101();
fuel101 = 5.0f;
score = score + 25;
}
//enemy three
if (running == 1)
{
for (int s=1; s < 10; s++)
{
float oldx = dbObjectPositionX(102);
float oldy = dbObjectPositionY(102);
float oldz = dbObjectPositionZ(102);
dbPointObject( 102,dbObjectPositionX(J),dbObjectPositionY(J),dbObjectPositionZ(J) );
dbMoveObject (102, enemymove);
float x = dbObjectPositionX(102);
float y = dbObjectPositionY(102);
float z = dbObjectPositionZ(102);
//SC_UpdateObject (123);
int brittany= SC_SphereSlide( 0, oldx,oldy,oldz, x,y,z, littleRadius, 102 );
if ( brittany > 0 )
{
if (world == 11)
{
}
else
{
dbPositionObject( 102, SC_GetCollisionSlideX(),SC_GetCollisionSlideY(),SC_GetCollisionSlideZ() );
}
}
if ( brittany == 2)
{
fuel = fuel - 20.0f;
fuel102 = 0.0f;
}
SC_UpdateObject( 102 );
}
}
if (collide == 102)
{
fuel102 = fuel102 - 5.0f;
collide = 0;
}
if (fuel102 == 0.0f)
{
makeEnemy102();
fuel102 = 5.0f;
score = score + 25;
}
//make enemy four
if (running == 1)
{
for (int s=1; s < 10; s++)
{
float oldx = dbObjectPositionX(126);
float oldy = dbObjectPositionY(126);
float oldz = dbObjectPositionZ(126);
dbPointObject( 126,dbObjectPositionX(J),dbObjectPositionY(J),dbObjectPositionZ(J) );
dbMoveObject (126, enemymove);
float x = dbObjectPositionX(126);
float y = dbObjectPositionY(126);
float z = dbObjectPositionZ(126);
//SC_UpdateObject (123);
int brittany= SC_SphereSlide( 0, oldx,oldy,oldz, x,y,z, littleRadius, 126 );
if ( brittany > 0 )
{
if (world == 11)
{
}
else
{
dbPositionObject( 126, SC_GetCollisionSlideX(),SC_GetCollisionSlideY(),SC_GetCollisionSlideZ() );
}
}
if ( brittany == 2)
{
fuel = fuel - 20.0f;
fuel126 = 0.0f;
}
SC_UpdateObject( 126 );
}
}
if (collide == 126)
{
fuel126 = fuel126 - 5.0f;
collide = 0;
}
if (fuel126 == 0.0f)
{
makeEnemy126();
fuel126 = 5.0f;
score = score + 25;
}
//make enemy five
if (running ==1)
{
for (int s=1; s < 10; s++)
{
float oldx = dbObjectPositionX(127);
float oldy = dbObjectPositionY(127);
float oldz = dbObjectPositionZ(127);
dbPointObject( 127,dbObjectPositionX(J),dbObjectPositionY(J),dbObjectPositionZ(J) );
dbMoveObject (127, enemymove);
float x = dbObjectPositionX(127);
float y = dbObjectPositionY(127);
float z = dbObjectPositionZ(127);
//SC_UpdateObject (123);
int brittany= SC_SphereSlide( 0, oldx,oldy,oldz, x,y,z, littleRadius, 102 );
if ( brittany > 0 )
{
if (world == 11)
{
}
else
{
dbPositionObject( 102, SC_GetCollisionSlideX(),SC_GetCollisionSlideY(),SC_GetCollisionSlideZ() );
}
}
if ( brittany == 2)
{
fuel = fuel - 20.0f;
fuel127 = 0.0f;
}
SC_UpdateObject( 127 );
}
}
if (collide == 127)
{
fuel127 = fuel127 - 5.0f;
collide = 0;
}
if (fuel127 == 0.0f)
{
makeEnemy127();
fuel127 = 5.0f;
score = score + 25;
}
//make enemy six
if(running ==1)
{
for (int s=1; s < 10; s++)
{
float oldx = dbObjectPositionX(128);
float oldy = dbObjectPositionY(128);
float oldz = dbObjectPositionZ(128);
dbPointObject( 128,dbObjectPositionX(J),dbObjectPositionY(J),dbObjectPositionZ(J) );
dbMoveObject (128, enemymove);
float x = dbObjectPositionX(128);
float y = dbObjectPositionY(128);
float z = dbObjectPositionZ(128);
//SC_UpdateObject (123);
int brittany= SC_SphereSlide( 0, oldx,oldy,oldz, x,y,z, littleRadius, 128 );
if ( brittany > 0 )
{
if (world == 11)
{
}
&