Thread: interfacing a program with a game

  1. #1
    Registered User
    Join Date
    Feb 2005
    Posts
    13

    interfacing a program with a game

    Yea im trying to make a program to run scripts for the game called Americas Army for my clans server. Issue is that you have to execute commands in the game console like exec system_config.txt in order for it to run the script. the scripts are in text files. see to initially start the program you would need to type in the game console "exec script_program.exe" and then the program would run a script every 8 seconds giving it time to load. if anyone can help me then it is appreciated.

  2. #2
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398

    Lightbulb system(), loop, sleep()

    ...execute commands in the game console like exec system_config.txt...
    You might be able to use the system() command. Something like:
    system("C:\MyScripts\exec system_config.txt")

    ....run a script every 8 seconds...
    To do something over-and-over, you need a loop. And, you need to make your program wait, or sleep each time through the loop.

  3. #3
    Registered User
    Join Date
    Feb 2005
    Posts
    13
    hmm i havent tried that system command but i know the sleep command but i dont need a loop cuz it only runs so many. thanks for the input tho. ill try it out and see if it works.

  4. #4
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    There should be a C-style interface to the scripting engine. Perhaps the game does not support external scripting tools but my guess would be that a simple startup file that points to the script is the key. This file would then be read by the game at the start of the mission.
    Execing the script from the console sounds very odd - it is possible this function is not totally completed yet.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How does this Game Maker-like c program look
    By hahaguy in forum Game Programming
    Replies: 0
    Last Post: 04-23-2009, 06:32 AM
  2. 2D RPG Online Game Project. 30% Complete. To be released and marketed.
    By drallstars in forum Projects and Job Recruitment
    Replies: 2
    Last Post: 10-28-2006, 12:48 AM
  3. Lottery game
    By geetard in forum C++ Programming
    Replies: 2
    Last Post: 12-20-2005, 12:50 AM
  4. need help with a guessing game program
    By davidnj732 in forum C++ Programming
    Replies: 3
    Last Post: 04-01-2003, 11:59 AM