Skip to content

Commit

Permalink
Update Main.gd
Browse files Browse the repository at this point in the history
  • Loading branch information
trevyn committed Jun 20, 2024
1 parent a9b59b5 commit 04a725f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Main.gd
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ var bananas: int = 0

func _ready() -> void:
var initialize_response: Dictionary = Steam.steamInitEx()
var inputType = Steam.getInputTypeForHandle(Steam.getControllerForGamepadIndex(0))
$SteamStatus.text=str(inputType)+" "+str(initialize_response)
var controller=Steam.getControllerForGamepadIndex(0)
var inputType = Steam.getInputTypeForHandle(controller)
$SteamStatus.text=str(controller)+" "+str(inputType)+" "+str(initialize_response)
print("Did Steam initialize?: %s " % initialize_response)
Steam.inputInit()

Expand All @@ -31,7 +32,7 @@ func _process(_delta: float) -> void:

func _on_button_2_pressed() -> void:
print ("button pressed")
Steam.triggerRepeatedHapticPulse(Steam.getControllerForGamepadIndex(0), 0, 5000,5000,50,0)
Steam.triggerRepeatedHapticPulse(Steam.getControllerForGamepadIndex(0), 0, 50000,50000,10,0)
#var device := 0 # The joystick device index, change as needed
#var weak_magnitude := float($Weak.text) # Weak vibration strength (0 to 1)
#var strong_magnitude := float($Strong.text) # Strong vibration strength (0 to 1)
Expand Down

0 comments on commit 04a725f

Please sign in to comment.