Topic: Spawn  (Read 3240 times)

0 Members and 1 Guest are viewing this topic.

Centauri Vaughn

  • Guest
Spawn
« on: July 14, 2003, 07:59:14 pm »
Its a new single / multiplayer mission for SFC3..

No browsing files or folders, just click on the installer and your set up.


Description:
MISSION TYPE: Multiplayer 1-6 Human Players vs Enemy AI.

GAME PLAY: Enemy Ships will be created and 'SPAWN' create another ship upon its destruction. The Custom Dialog allows the Host to select an Enemy Race and Spawn Count by setting the dialog controls from 1-100 or Unlimited Count.

SHIP OPTIONS: Host can choose to fight standard 'Stock Ships' that are read from the 'DefaultLoadout.txt' file for [easy - medium] game play or choose to fight 'Custom Ships' that are read from the 'CustomLoadOut.txt' file for [medium - hard] game play.

NOTE: You can only use the 'CustomLoad.txt' file that is included with this software package. View the 'SpawnReadMe' for more details.

SPAWN RECORDS FILE: Each player gets a 100 points for each enemy ship that is destroyed, the player(s) with the highest points win the game. A score file 'Spawn Records' is created on the host players machine 'Local Disk C' drive.


 http://www.gfluniverse.com/nuke/html/modules.php?name=Downloads&d_op=getit&lid=34
 
 
« Last Edit: December 31, 1969, 06:00:00 pm by Centauri Vaughn »

The_Pelican

  • Guest
Re: Spawn
« Reply #1 on: July 15, 2003, 11:05:27 am »
I'm interested to know how you got the game to read from a file outside of the script. I'm still new to scripting, and I haven't quite figured everything out yet.

Karnak

  • Guest
Re: Spawn
« Reply #2 on: July 15, 2003, 12:22:11 pm »
In SFC2 API, one can use the regular C/C++ File I/O functions like fopen,fclose, fread, fprintf, ::open, etc.  It will read from the script directory.

The_Pelican

  • Guest
Re: Spawn
« Reply #3 on: July 15, 2003, 02:48:50 pm »
Hmm, like I said, I'm new to scripting, and just as new to C++, fortunately, I'm a quick learner. I'll see what I can figure out.

Remus

  • Guest
Re: Spawn
« Reply #4 on: July 15, 2003, 03:40:20 pm »
Quote:

In SFC2 API, one can use the regular C/C++ File I/O functions like fopen,fclose, fread, fprintf, ::open, etc.  It will read from the script directory.  




Which can be a great debugging tool if you have a script that is crashing the game
 

Centauri Vaughn

  • Guest
Re: Spawn
« Reply #5 on: July 15, 2003, 03:58:46 pm »
Quote:

 I'm interested to know how you got the game to read from a file outside of the script. I'm still new to scripting, and I haven't quite figured everything out yet.





Here is an easy example.

In C++ make a win32 console application / empty project / create a source file.  

Copy and paste this code, edit as you wish.

Hope this helps.

#include <iostream>


using std::cout;
using std::cin;



 int main (void)
{
   int number;
     

   cout << "Enter a number  ";
   cin >> number;
   cout << std::endl;
   cout << "Your name has appeared " << number; cout <<" times.";
   cout << std::endl;

   for ( int k = 0; k < number; k++)
   {
      
      cout << (k+1) << "The Pelican\n";

   }
   
                      FILE * fp = NULL;
    fp = fopen("C:\\MyC++TextFile.txt", "w");
    fprintf(fp, "***************MY C++ TEXT FILE**************\n\n");
    fprintf(fp, "My name appeared %d times.",number);
    fclose(fp);

   return 0;
}