Dynaverse.net
Taldrenites => Starfleet Command Mission Scripting => Topic started by: Centauri Vaughn 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
-
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.
-
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.
-
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.
-
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 
-
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;
}