Useful feature: “Hostile Pause”

Home Forums Torn Stars Useful feature: “Hostile Pause”

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #16740
    SRC
    Participant

    Hello All,

    I’m learning to code in POG and am trying to implement in Bineshi’s old Unleashed IWar-2 mod a function that will PAUSE game play on the first appearance of a “hostile” within the player ship’s sensor range.

    This has obvious utility for stepping away from the screen without manually pausing, and also could be useful for ambushes of factions which are already hostile, for example by lurking at a L-point. One could get on with one’s life and come back to find the game PAUSEd just at the right time to spring an ambush and collect some cargo.

    This fragment returns a Boolean variable whether there are hostiles within sensor range:

    Set.IsEmpty(iSim.PlayerHostilesInRadius( iShip.MaxSensorRange( player_ship ), TM_Ship ) )

    This is most of the way to my desired function, but I cannot discover how to invoke the Pause function. The config file binds a function called “Spaceflight.Pause” to a key, but when I try to call this (and I’m not sure of the syntax, arguments, etc, so I’m coding blind), the compile.bat cannot find a prototype for this function, and I don’t know whether it is in any of the .h files that are released; it is presumably not in the header files in the “include” folder that comes with the Pog compiler.

    Any help would be appreciated. This function might also be a helpful thing to add to TS or US for the same “wait until ambush” agenda.

    It’s a great game; thanks to all who have worked on it.

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.