TGC Codebase Backup



A simple shooting function by tomtetlaw

20th Apr 2009 20:58
Summary

This is DarkGDK code btw. You make lots of plains, texture them, and hide them, then when you click, it puts one wherever you are looking.



Description



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    int counter = 1;
dbLoadImage( "bullethole.png", 1 );

for( int i = 0; i > 1200; i++ )
{
    dbMakeObjectPlane( i, 1 );
    dbTextureObject( i, 1 );
    dbHideObject( i );
}
if( dbMouseClick( ) )
    dbShowObject( counter );
    dbPositionObject( counter, dbCameraLookX( ), dbCameraLookY( ), dbCameraLookZ( ) );
if( counter >= 1200 )
    counter = 1;