momentum-mod/game

trigger_setspeed

Opened this issue · 1 comments

@SolidClass base(Trigger)
= trigger_setspeed : "A trigger volume that sets the exact speed of entities that are touching it." 
	[
	HorizontalSpeed(float) : "Horizontal Speed" : 500 : "The new horizontal speed to apply. Direction depends on Horizontal Speed Mode."
	HorizontalSpeedMode(choices): "Horizontal Speed Mode": 0 : "Determines how horizontal speed is applied. If direction is not changed, the entity's current velocity direction is retained. If the entity is not moving, its angles are used instead." =
		[
		0: "Set exact speed and direction"
		1: "Set exact speed, don't change direction"
		2: "Increase only, don't change direction"
		3: "Decrease only, don't change direction"
		4: "Ignore"
		]
	HorizontalSpeedYaw(float): "Horizontal Speed Yaw Angle" : 0 : "If this entity's Horizontal Speed Mode is 'Set exact speed and direction', this yaw angle determines the new horizontal velocity direction."
	VerticalSpeed(float) : "Vertical Speed" : 0 : "The new vertical speed to apply."
	VerticalSpeedMode(choices): "Vertical Speed Mode": 4 : "Determines how vertical speed is applied. 'Increase only' and 'Decrease only' look at exact values, not just magnitudes." =
		[
		1: "Set exact speed"
		2: "Increase only"
		3: "Decrease only"
		4: "Ignore"
		]
	]

Some issues I've found with the current trigger_setspeed:

  • When placed on the ground, the player can get more speed by jumping out of the trigger (probably due to ground friction)
  • Too many update interval properties (Update every interval, interval, every tick). Can probably be refactored into one property (-1 = every tick, 0 = on start touch, > 0 = custom interval). Dunno if the refactor makes these properties obsolete.