Input Action events
How can I use a vanilla input action event? I want to use this so I can do something every time a building is sampled but just adding it to the Game World event graph doesn't seem to work.
10 Replies
and you've already checked that the thing with that node is capable of receiving input?
What do you mean?
actors/widgets don't magically work with input actions out the gates
sec
example mod has something for this, trying to find docs
Solution
Ah, so it just might not work because I'm in a mod Game World
Keys don't work in modules AFAIK because they are UObjects. You need a world actor to enable input on like a subystem
Ok, I'll try that
Yup, doing it in a subsystem worked. Thanks!
Keep in mind that vanilla does not in fact use this node outside of UI widgets and it will break with splitscreen as well (if we were to add it at some point)
prefer registering handler on player controller instead
I don't think that approach is documented... unless it's on here somewhere? https://docs.ficsit.app/satisfactory-modding/latest/Development/Satisfactory/EnhancedInputSystem.html#_responding_to_input_actions_in_code
AFGCharacterPlayer::OnPlayerInputInitialized
is similar to it but there is a delegate for player controller as well i think
nevermind, no delegate available, i guess you have to listen on the character level or hook AFGPlayerController::SetupInputComponent