doswls1
(doswls1)
May 13, 2024, 10:12am
1
i made BaseCharacter With CharacterMovementComponent
and made a child BPs PlayerCharacter and NpcCharacter
i can play like this normally but i found that if i do this function : CharacterMovement->SetMovementMode
it effect both player and Npc
it should effect only player component if player sets MovementMode if i did right
but it effects both
if anyone knows the reason please reply and solution if you can
Change the setting in the player character, not the basecharacter?
doswls1
(doswls1)
May 13, 2024, 11:40am
3
yes basecharacter… and i think i need to make movementcomponent to player and npc not base character
doswls1:
yes basecharacter…
No, player character?
The movement component can stay in the base character, but make the update in the player character.
doswls1
(doswls1)
May 13, 2024, 12:08pm
5
i see i can try that i am updating that in base character now
1 Like
doswls1
(doswls1)
May 13, 2024, 12:21pm
6
it’s same looks like they use same movement component
1 Like
Just checking, so you set the movement mode, in the player character?
doswls1
(doswls1)
May 13, 2024, 12:26pm
10
but if this case if npc moves by ai player needs to move as well but it doesn’t
How did you make the children from the base character?
doswls1
(doswls1)
May 13, 2024, 12:31pm
12
base character with character
and i did mouse right click and create child blueprint class
1 Like
doswls1
(doswls1)
May 13, 2024, 12:34pm
13
well…i am going to remake everything and i am not gonna inherit anything -_-; just player and npc
doswls1
(doswls1)
May 13, 2024, 12:36pm
14
it’s lucky i found it early if i find it far later that will be disaster
1 Like
You can ensure that only the player is affected, you should override the SetMovementMode
function in the PlayerCharacter class and ensure it’s only modifying the player’s movement mode. This way, the NPC’s movement mode remains unchanged. mydestinycard login
doswls1
(doswls1)
May 13, 2024, 5:02pm
16
i think i made code works that way
i was making swimming mechanic and i had that problem
and i was making mistake in the logic lol
after changing it works fine with set movement mode to swimming
doswls1
(doswls1)
May 14, 2024, 7:04am
17
no set movementmode to Swimming still make the problem
i needed to use flying instead that has same effect with no problem
if anyone has this problem this is one of the solution
I just tried this.
I make two children of the first person character.
I can change the movement mode of either of them and it doesn’t affect the other. I can possess either and move with the mode that I have set on that one.
doswls1
(doswls1)
May 14, 2024, 8:17am
19
did you try swiming
i did this set water volume = true and set movement mode to swimming
doswls1:
water volume = true
Where do you set this?
Ok, character movement…