Skip to content

Commit

Permalink
Added variable for effect length
Browse files Browse the repository at this point in the history
  • Loading branch information
Dechode committed Feb 14, 2022
1 parent 08db235 commit 785f18f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/Main.gd
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ func _ready() -> void:
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
amplitude = $AmplitudeSlider.value
var length = 0 # 0 for infinite

if is_running:
if $ffbplugin.update_constant_force_effect(amplitude, 0, effect_id) != 0:
if $ffbplugin.update_constant_force_effect(amplitude, length, effect_id) != 0:
print("Updating constant force effect failed!")
is_running = false

$RunningLabel.text = "Running = " + str(is_running)


Expand Down

0 comments on commit 785f18f

Please sign in to comment.