Skip to content

Commit

Permalink
Implement adding exe as argument to launch script
Browse files Browse the repository at this point in the history
  • Loading branch information
lL1l1 committed Nov 22, 2024
1 parent 28ea85b commit 634d326
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions scripts/LaunchFAInstances.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
[int]$players = 2, # Default to 2 instances (1 host, 1 client)
[string]$map = "/maps/scmp_009/SCMP_009_scenario.lua", # Default map: Seton's Clutch
[int]$port = 15000, # Default port for hosting the game
[int]$teams = 2 # Default to two teams, 0 for FFA
[int]$teams = 2, # Default to two teams, 0 for FFA
[string]$exe = "ForgedAlliance.exe" # exe filepath string, can be relative or exact
)

# Base path to the bin directory
Expand Down Expand Up @@ -58,7 +59,12 @@ function Launch-GameInstance {
[string]$arguments
)

# Add window position and size arguments
# Add exe argument used by debugger
if ($gameExecutable -eq $debuggerExecutable) {
$arguments = "$exe $arguments"
}

# Add window position and size arguments
$arguments += " /position $xPos $yPos /size $windowWidth $windowHeight"

try {
Expand Down

0 comments on commit 634d326

Please sign in to comment.