#run/walk speed system

1 messages · Page 1 of 1 (latest)

spiral hinge
#

as apart of uni for whatever reason i have to use visual scripting but i for the life of me cant figure out why / how this works

#

i really dont know how to connect it in order to just well first of all before getting shift input just see the sprintMeter go down every second

#

in my objects i have this

#

in graph variables i have this

#

my existing thought on this would've been from a logic standpoint :

on start -- > get sprintDuration -- > getDelta time --- > subtract --- > set sprintMeter but that doesnt work

#

idk any help woild be appreciated im so lost w this... have coded in other languages before but visual scripting is next level sorcery

fallen python
#

Visual scripting is not the next level sorcery lol

You just gotta think in the logic first. So lets think:

  1. you want shift to turn on sprinting when pressed once or holded?

  2. shift have a "battery" that recharges when stopped or it has a fixed duration since started like a boost?

#

The way i did sprinting before, i use a bool.

When shift is pressed, isRunning turns True

Then i use a select node. If true, then use moveSpeed x 2. If false, moveSpeed