Skip to content

Tune match rules

This tutorial walks through changing how long matches last, how kickoff and goal resets feel, and when goals are allowed to count.

stateDiagram-v2
  [*] --> Countdown: BeginMatch
  Countdown --> Playing: TimerHandle_MatchCountdown expires
  Playing --> GoalPause: ScoreGoal
  GoalPause --> Playing: Ball Reset Countdown
  Playing --> Overtime: Match Time ends tied
  Overtime --> Playing: Next goal or timer
  Playing --> [*]: bEndMatch
  Overtime --> [*]: bEndMatch
  1. Open Content → VehicleSoccerTemplate → Blueprints → Game → BP_VehicleGameMode.
  2. In the Details panel (class defaults), expand Vehicle Game Mode Settings (ST_VehicleGameSettings).
  3. Set Match Time to your desired regulation length in seconds (for example 300 for five minutes).
  4. Compile and save.

The same struct is bound to the Match Time spin box on WBP_MainMenu, so players can override the value per session from the menu.

Still on Vehicle Game Mode Settings (game mode defaults or main menu widget):

PropertyEffect
Play ModeSolo or team size (1 x 1 through 5 x 5) for hosted matches
Match Count DownSeconds shown on WBP_VehicleUI before BeginMatch
Ball Reset CountdownPause after each goal before BP_Ball respawns at Ball Spawn Transform

Lower Match Count Down for faster restarts. Raise Ball Reset Countdown if you want more time for goal celebrations (MS_Goal, fireworks, BP_LightBeam).

Open BP_VehicleGameState:

PropertyEffect
bCanScoreGoalWhen false, BP_GoalPost ignores overlaps — use during countdown or replay cameras
bIsOvertimeEnables sudden-death behaviour and OvertimeText on the HUD

If goals register too early after kickoff, trace the countdown branch that sets bCanScoreGoal back to true after TimerHandle_MatchCountdown expires.

On BP_VehicleGameState, review the logic that sets bIsOvertime when regulation Match Time ends with tied scores. Common tweaks:

  • End the match immediately on a tie (skip overtime by forcing bEndMatch).
  • Keep bIsOvertime active until the next goal instead of using a timer.
  • Drive WBP_VehicleUI → OvertimeAnimation for a clearer HUD cue.
  1. Press Play on Map_MainMenu.
  2. Click Play Solo, pick a vehicle, and start a match.
  3. Score a goal and watch the ball reset delay.
  4. Let the clock expire to verify overtime or match-end behaviour.

Example A — Casual solo (three-minute game)

Section titled “Example A — Casual solo (three-minute game)”

Set Vehicle Game Mode Settings on BP_VehicleGameMode:

FieldValue
Play ModeSolo
Match Time180
Match Count Down3
Ball Reset Countdown2

Expected feel: Kickoff after a short countdown, goals respawn the ball quickly, match ends around three minutes. Good for first-time players learning boost and ball control.

Use these values on WBP_MainMenu before clicking Host Match:

FieldValue
Play Mode2 x 2
Match Time300
Match Count Down5
Ball Reset Countdown4

Expected feel: Five-minute team games with time for goal VFX (MS_Goal, NS_Fireworks) before the ball returns to Ball Spawn Transform.

FieldValue
Play ModeSolo
Match Time90
Match Count Down1
Ball Reset Countdown1

Pair with faster boost respawns — on BP_Boost, lower Respawn Time from 4 to 2 so pickups return sooner during hectic play.

If you add a goal replay camera on BP_TV:

  1. When replay starts, set BP_VehicleGameState → bCanScoreGoal to false.
  2. When replay ends, set it back to true.

This prevents double-counting if the ball is still inside a BP_GoalPost volume when play resumes.