The mapper has full control of the minigolf tracks using the scripted entities (SENTs) specified in the chapter below.
In order to quickly add the below entities you can include the minigolf.fgd
in Hammer (Tools > Options > Game Configurations > Game Data Files > Add).
Describes where players start to play on a minigolf track (by pressing USE
on it). The hole and description are displayed on the players' GUI.
-
targetname
: You need to give every start entity a unique name. One or moreminigolf_hole_end
will point to this. -
par
: average amount of strokes players should aim for (default: 3) -
hole
: the name of this hole (required) -
course
: the name of the course this hole is on, for when there are multiple courses on one map (default: "", (an empty string)) -
order
: number used for ordering holes on the scoreboard (lower numbers appear higher) -
limit
: how long players can take on the hole in seconds (default: 60) -
description
: a description for the hole -
maxStrokes
: how many strokes are allowed before the game ends automatically (default: 12) -
maxPitch
: how many degrees pitch a player can make a lob shot at, don't specify or set as 0 to indicate no lob shots allowed (default: 0) -
maxRetriesAfterCompleting
: how many times a player can retry this hole after completing it. -1 for infinite, 0 for no retries until all holes have been finished -
maxRetriesAfterTimeLimit
: how many times a player can retry this hole after reaching the time limit. -1 for infinite, 0 for no retries until all holes have been finished -
maxRetriesAfterMaxStrokes
: how many times a player can retry this hole after reaching the maximum amount of strokes. -1 for infinite, 0 for no retries until all holes have been finished
-
In hammer spawn a new Point Entity and select it
If you are not using the minigolf.fgd
:
-
In the
Class
dropdown select all text and remove it, typingminigolf_hole_start
instead. The entity will always have theObsolete
icon -
Turn of
SmartEdit
by clicking the button -
Click
Add
-
Now type in the properties listed above under
Key
. -
Give your desired value under
Value
then click OK to finalize your configuration.
If you are using the minigolf.fgd
:
-
Select the
minigolf_hole_start
from theClass
dropdown -
Configure the available properties
When the map is loaded by the gamemode these values are stored in memory.
Specifies the end/goal/hole. When the ball touches this brush the player will have reached the end in as many strokes as they have up to that point.
Because of this design, in theory it's possible (untested) to have a hole with a single start and multiple valid ends (that all point to the same start.)
start_hole
: The targetname of aminigolf_hole_start
that is associated with this end.
-
Create one or multiple brushes in Hammer, along the edges and over the top of the minigolf track.
-
Give these brushes the 'trigger' material on all faces.
-
Now press
Ctrl + T
to tie it to an entity -
Choose
minigolf_hole_start
as the entity type by typing it into the class name (or selecting it if you are using theminigolf.fgd
). -
Edit the
start_hole
(Start Hole) property using the eyedropper tool. -
Click the
minigolf_hole_start
that is associated with this end: You need to have made sure that theminigolf_hole_start
has a name (targetname
property).
This entity adds a flag to a hole. When the player comes near the flag it will raise, allowing them to see the ball better around the hole area.
-
Create a point entity with the class
minigolf_hole_flag
-
Rotate the entity in the object properties menu to change the rotation of the flag relative to the top(x/y) view:
-
Make sure the entity is touching the related
minigolf_hole_end
When the ball touches this brush the ball is considered Out-Of-Bounds. The ball will be reset to the last valid position There are no properties for this entity.
-
Create one or multiple brushes in Hammer, along the edges and over the top of the minigolf track.
-
Give these brushes the 'trigger' material on all faces.
-
Now press
Ctrl + T
to tie it to an entity -
Choose
minigolf_trigger_oob
as the entity type by typing it into the class name (or selecting it if you are using theminigolf.fgd
).
A point entity that dictates how the addon should behave. It can set default information for all holes. There should be only one of this entity on a map.
-
defaultMaxRetriesAfterCompleting
: How many times a player can retry any hole after completing it. The maxRetriesAfterCompleting property on a hole overrides this. -1 for infinite, 0 for no retries until all holes have been finished (default: 0) -
defaultMaxRetriesAfterTimeLimit
: How many times a player can retry any hole after reaching the time limit. The maxRetriesAfterTimeLimit property on a hole overrides this. -1 for infinite, 0 for no retries until all holes have been finished (default: 0) -
defaultMaxRetriesAfterMaxStrokes
: How many times a player can retry any hole after reaching the maximum amount of strokes. The maxRetriesAfterMaxStrokes property on a hole overrides this. -1 for infinite, 0 for no retries until all holes have been finished (default: 0)
You can control more behaviour by applying any of the following properties to any point and/or brush entities.
- (Key)
minigolfCollide
- Useful for func_physboxes that should only interact with balls or other physboxes
- Possible values:
except_players
: Collide with everything, except playersonly_balls
: Collide only with minigolf ballsonly_others
: Collide only with other entities that haveonly_others
(orballs_and_others
) as a value for this propertyballs_and_others
: Collide with balls and entities withonly_others
orballs_and_others
as a value for this property
-
Mostly done map by Elkinda which combines all maps listed below into a single hub: golf_rocket_hub_alpha2.vmf (compiled .bsp)
-
Almost complete desert map by Luttje: golf_desert_alpha14.vmf (compiled .bsp)
-
Experimental map by Elkinda: golf_test_course21.vmf (compiled .bsp) Luttje: golf_dev_minimal_v3.vmf (compiled .bsp)
-
Community Map: golf_garage_league_start2.vmf (compiled .bsp)
-
The idea for this map is to have the community create and submit holes inside the garage boxes of this level.
-
Holes already created are:
- Elkinda's "Terrain"
- Luttje's "Bouncer"
-
The other garage boxes (0 through 7 and 10 and 11) are currently empty.
-
Source Engine is great at optimizing games for computers with non-ideal hardware. Some of this optimizing is done before-hand, for example when compiling the map. If you notice that compilation is taking longer than half a minute you should check the following.
- Compile your map (
File > Run Map
) - In Hammer, go to
Map > Load Portal File
- A simple healthy map looks like this:
- Let's create a minigolf hole in it, compile and then reload our portal file:
- To fix this we will tie the brushes that make up the minigolf track to a
func_detail
entity (select all those brushes and pressCtrl + T
): - After we compile again and re-load our portal file we see that it has helped to reduce portals:
Click here to read more about how these portals optimize the game, as well as to see why we don't need them around our minigolf tracks