Ziqul Posted May 11 Posted May 11 Started digging in UE guts of remaster and got stuck. Would much appreciate if someone will help figure this out, or at least point me in the direction of where to look. ## Problem 1 For the love of me cannot figure out how to construct `InputAction` for a function call. For example: Class `/Script/Altar.VEnhancedAltarPlayerController` has method `ToggleWalk`. UE4SS tell that this method has one parameter called `Value` (`StructProperty /Script/Altar.VEnhancedAltarPlayerController:ToggleWalk:Value`). Going trough CXX Headers I can find out that this "Value" is of type `FInputActionValue&` (`Altar.hpp:4615: void ToggleWalk(const FInputActionValue& Value);`). Finding instance of `VEnhancedAltarPlayerController` (for example `BP_AltarPlayerController_C`) and clicking "Find Function" in UE4SS gives this hint: `StructProperty (InputActionValue) e.g.: (Prop1=Val1,Prop2=Val2,Prop3=Val3)`. So in my code I am calling `ToggleWalk` like this: `playerController:ToggleWalk({1.0, 0.0, 0.0})` and even thought there is no errors - nothing happens. No matter if I "walk" or "run"! I know that I am doing something wrong, but what? ### TLDR 1 How do I toggle walking state via UE4SS? ## Problem 2 I am trying to figure a way to hook into "combat start" (enemy becomes aggressive, combat music plays, "IsInCombat" in CS), but only function that I was able to find is `InCombatState` (`Function /Game/UI/Modern/HUD/Reticle/WBP_ModernHud_CrosshairSneakEye.WBP_ModernHud_CrosshairSneakEye_C:InCombatState`). And that function works exactly as I need - it fires once when combat starts, the problem with it is that it only fires when player is in "sneak". So the question is - are there any functions (or other ways) that can help me determine when combat starts?
Ziqul Posted May 12 Author Posted May 12 In relation to Problem 2 I am 90 percent sure that game should have some kind of function that is called when combat started. There should be some "StartMusic(BattleMusicFile)" function that "RegisterHook" should be able to accept. I have watched all AkAudioEvent methods and there was nothing like that. I also watched all ReveiceBeginPlay (I think this one is more related to animations), also nothing there. Does anybody know how music files are being started in Remaster?
Recommended Posts