Toggling rider visibility

I’m trying to make a saddle which sets the rider invisible while riding the dino. The only problem I’m having is setting the rider visible again when exiting the mount.

https://dl.dropboxusercontent.com/u/8512731/ARKDevkit/setvi.jpg

Here is the very simple graph I played around with. This one obviously doesn’t work as the rider component is not available as soon as I exit the mount. Is there a way to cancel the previous “Set Actor Hidden In Game” when the “Has Rider” goes to false?

https://dl.dropboxusercontent.com/u/8512731/ARKDevkit/Pl3.jpg

So this one works, but only for yourself or should I say for clients. If another player connects then you can’t see him when he exits the mount. Is there a more reliable way to do this or do I have to create 127 “Get Player Pawns” to make it work :D?

The reason it only works for your local client is because that is a local pawn reference. There is no server communication(read: replication) happening there so it’s quite expected that other clients won’t be informed of the change.

How exactly you would solve that… I wouldn’t know.

I would theorise that grabbing a reference of the rider before doing the changes and storing that temporarily, then using that to change the visibility, could possibly work. I don’t know for certain though.

-WM

Except that in this case I’m the one who is not seeing the change. The client (my buddy in this case) sees me and himself just fine. Instead I’m the one that’s not seeing him after he de-mounts the dino.

That’s what I just said. The change is only going to be visible to the client it runs on. There’s no replication, because that’s a local reference node, it’s used where there’s only one player, or rather, in a development title where the developer(s) manually control that information.

If you want the change to be replicated to other clients, then you need to change how you’re getting the pawn.

-WM

But why is it that adding another “Get Player Pawn” with next index makes it work for both players? Now if a 3rd player joins his character will be messed up for the 1st and 2nd player, but he will see the others just fine. Wouldn’t this mean that I could just put 127 of these nodes to get it working in theory?

Then again that’s a terrible way to do it and I guess 127 players isn’t the max you can have (though who even has that many on one server).

Each client only knows about itself initially, and doing that potentially could have side effects.

Have you tried what I suggested?

-WM

How does one store the rider temporarily?

See if that does anything.

Wouldn’t hold my breath though.

-WM

Thanks you so much for the graph. There was a slight problem with the “DoOnce” node as it always recorded the variable when there was no rider. I added another branch and now it works like a charm :smiley:

https://dl.dropboxusercontent.com/u/8512731/ARKDevkit/Norider.jpg

Thanks~