Re: [EF2] Question...
Here my Script tested and complete with a map....
As attachment...
//----------------------------------------------------------------------
//----------------------------------------------------------------------
//
// EF2 Map Script File
//
// Map: mp_shuttle
// Script By: Christian Strahl (Chrissstrahl)
// Geometry By: Christain Strahl (Chrissstrahl)
// Created on: ??/Oct/2006
// Version: 3.0 pre/alpa
//
// Feedback: chrissstrahl[€]yahoo.de
// Website:
www.hazardmodding.chrissstrahl.de
// Organisation: HazardModding
//
// ABOUT THE SCRIPT
// ################################################## ###################
// Print Position To Consol - Script 02:09 24.10.2006 [CET]
// I did use a early version of my map mp_shuttle for demonstration.
// Your Position will be printed into the console each 5 secounds...
//----------------------------------------------------------------------
//----------------------------------------------------------------------
// Definie Start Vars
//----------------------------------------------------------------------
// Definie them at first so each included script can read them.
// Do not type the vars in Lowerchase, this makes you harder to find them.
//----------------------------------------------------------------------
float refresh = 5;
vector possi;
string possiX;
string possiY;
string possiZ;
//Declare the script functions
//----------------------------------------------------------------------
// So you can call each function from each position in the script
// If you do so, you can save you a lot time by simplier scripting
//----------------------------------------------------------------------
void main();
void gimmePosition();
// main()
//----------------------------------------------------------------------
// Here you can put stuff in wich shoud start on map loading
// If you wana have a thread keep running you shoud better
// Start a new Thread and not use this one!!!
//----------------------------------------------------------------------
void main()
{
thread gimmePosition();
}
// gimmePosition()
//----------------------------------------------------------------------
// Prints the players position to the Console
//----------------------------------------------------------------------
void gimmePosition()
{
while(1)
{
possi = $player.getorigin();
possiX = vectorgetx( $player.getorigin() );
possiY = vectorgety( $player.getorigin() );
possiZ = vectorgetz( $player.getorigin() );
print("Your Position\n");
print("-----------------------------------------------\n");
print("X:" + possiX);
print(", Y:" + possiY);
print(", Z:" + possiZ);
print("\n-----------------------------------------------\n");
wait(refresh);
}
}
//Eof (NOTE: This EMPTY line below is required at each script file, dono why!)