Skip to content

Commit d67f46d

Browse files
feat: Add trigger_momentum_bhop
1 parent 202d6b6 commit d67f46d

4 files changed

Lines changed: 30 additions & 23 deletions

File tree

db/factories/momentum.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ trigger_hierarchy
338338
trigger_impact
339339
trigger_jumppad
340340
trigger_look
341+
trigger_momentum_bhop
341342
trigger_momentum_disallowcheckpoint
342343
trigger_momentum_limitmovement
343344
trigger_momentum_progress

fgd/brush/func/func_bhop.fgd

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,6 @@
1-
@SolidClass base(func_brush)
1+
@SolidClass base(trigger_momentum_bhop)
22
appliesto(MOMENTUM)
33
line(255 255 0, targetname, target)
44
= func_bhop: "A brush entity that teleports the player if they stand on it for too long or land too many times."
55
[
6-
linedivider_bhop(string) readonly : "----------------------------------------------------------------------------------------------------------"
7-
8-
ProgressTeleport(boolean) : "Teleport to Progress Trigger" : 1 : "When activated, the player will be teleported to their last touched trigger_momentum_progress."
9-
target(target_destination) : "Remote Destination" : : "The entity specifying the point to which the player should be teleported (overrides progress teleport setting)."
10-
UseDestinationAngles(boolean) : "Use Destination Angles" : 1 : "Snap the player's angles and velocity direction to the angles of the destination entity."
11-
ResetVelocityOnTeleport(boolean) : "Reset Velocity on Teleport" : 0 : "Reset the player's velocity when teleported."
12-
LandingLimit(integer) : "Landing Limit" : 0 : "The maximum amount of times the player is allowed to land on this. A limit of 0 allows unlimited landings/bhops. A limit of -1 uses gamemode-specific behavior emulating func_door blocks from the appropriate game. Only full groundings count toward this, not just touching from above."
13-
14-
spawnflags(flags) : "spawnflags" =
15-
[
16-
1: "Reset landing counter when this is activated" : 1
17-
2: "Reset landing counter when the player lands on something that isn't a func_bhop" : 1
18-
4: "Reset landing counter when the player lands on anything else" : 0
19-
]
20-
21-
// Inputs
22-
input ResetLandingCount(void) : "Reset the landing counter"
23-
24-
// Outputs
25-
output OnLandingLimitReached(void) : "Fired when the player leaves the ground after the landing limit is reached. The player will be teleported when they next land."
26-
output OnActivate(void) : "Fired when the player would be teleported. Can be used for custom behavior instead of teleporting the player."
276
]
28-
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
@SolidClass base(Trigger)
2+
appliesto(MOMENTUM)
3+
= trigger_momentum_bhop : "Trigger that teleports the player if they stand inside of it for too long or land inside of it too many times."
4+
[
5+
linedivider_bhop(string) readonly : "----------------------------------------------------------------------------------------------------------"
6+
7+
ProgressTeleport(boolean) : "Teleport to Progress Trigger" : 1 : "When activated, the player will be teleported to their last touched trigger_momentum_progress."
8+
target(target_destination) : "Remote Destination" : : "The entity specifying the point to which the player should be teleported (overrides progress teleport setting)."
9+
UseDestinationAngles(boolean) : "Use Destination Angles" : 1 : "Snap the player's angles and velocity direction to the angles of the destination entity."
10+
ResetVelocityOnTeleport(boolean) : "Reset Velocity on Teleport" : 0 : "Reset the player's velocity when teleported."
11+
LandingLimit(integer) : "Landing Limit" : 0 : "The maximum amount of times the player is allowed to land on this. A limit of 0 allows unlimited landings/bhops. A limit of -1 uses gamemode-specific behavior emulating func_door blocks from the appropriate game. Only full groundings count toward this, not just touching from above."
12+
TimeLimit(float) : "Time Limit" : 0.1 : "How long the player can stay on the bhop platform before they get teleported. If this is 0, then use sv_bhop_time_limit."
13+
14+
spawnflags(flags) =
15+
[
16+
1: "Reset landing counter when this is activated" : 1
17+
2: "Reset landing counter when the player lands on something that isn't a func_bhop" : 1
18+
4: "Reset landing counter when the player lands on anything else" : 0
19+
]
20+
21+
// Inputs
22+
input ResetLandingCount(void) : "Reset the landing counter"
23+
24+
// Outputs
25+
output OnLandingLimitReached(void) : "Fired when the player leaves the ground after the landing limit is reached. The player will be teleported when they next land."
26+
output OnActivate(void) : "Fired when the player would be teleported. Can be used for custom behavior instead of teleporting the player."
27+
]

fgd/visgroups.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@
199199
- Trigger Multiple (`trigger_multiple`)
200200
- Player Movement Triggers
201201
* `trigger_playermovement`
202+
* `trigger_momentum_bhop`
202203
* `trigger_momentum_limitmovement`
203204
* `trigger_setspeed`
204205
- Level Transitions

0 commit comments

Comments
 (0)