playMaker

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - KillerCreeper

Pages: [1] 2 3
1
PlayMaker Help / Re: Send RPC To Certain Player?
« on: July 10, 2019, 06:52:46 PM »
Hi,

 I am not able to make sense of your setup... everything inside a Networked Object belongs to one player, so I am not sure how you can have a network instance belonging to a player and some of its children belonging to other players.

 Can you clarify?

 Bye,

 Jean

How my setup is:
I have a remote player that is a child of the player prefab. That remote player is the player model. It gets destroyed if "Is Mine" is true. But the remote player is what the other players see that player as, basically.
On each bone of the remote player, they have a collider on it. (This is so it is more realistic and because it easily works with animations)

Overall though, I did get it working by just setting each bone object a photon name (e.g. Head, Lower Leg L, Upper Leg R, Lower Arm L, etc).
I highly doubt that that is a good way to do it, but it works for now and I can always find a better change it if I really need to.

Edit: I also removed the photon ids on them since they were useless and wasteful.

2
PlayMaker Help / Re: Send RPC To Certain Player?
« on: July 08, 2019, 10:18:45 AM »
Hi,

 there is an action called PhotonViewRpcBroadcastFsmEventToPlayer

have you tried it?

Check out the chat system inside the playmaker photon demo, one player can chat to another directly, the same mecanism can be used for damage.

Bye,

 Jean

I can't use PhotonViewRpcBroadcastFsmEventToPlayer because that requires a player name. I have a "remote player" that is a child to the player prefab. It has different colliders on each bone: head, chest, upper arm, lower arm, upper leg, lower leg. The raycast only gets these objects, which don't have photon names but they have photon ids.

Am I able to put photon names on those objects without it breaking anything?

3
PlayMaker Help / Re: Send RPC To Certain Player?
« on: July 07, 2019, 10:23:58 AM »
I think what I need is a way to send an RPC to a certain photon view ID.

4
PlayMaker Help / Send RPC To Certain Player?
« on: July 05, 2019, 10:51:29 AM »
How can I make an RPC send to only a certain player? I'm trying to make it so when a player shoots, it sends a raycast out. If the raycast hits a player, it will send an RPC to only them that will damage them.

I have this video as a reference. At around 10:00, the last line of code. How can I do that, but in PlayMaker?

5
PlayMaker Help / Re: Find Object By Name In Assets Folder
« on: June 26, 2019, 07:48:17 PM »
Hey, thank you for the fast reply. Right after I made this post I actually changed the item ids back to integers. I've been debating whether I should or not since they used to be integers when I first created them. Later on, I changed them to strings, thinking it would be easier to use. At the time I didn't realize how heavy strings can be on performance.

Anyway, I tried what you said and it worked! So, thank you very much, I appreciate it.

6
PlayMaker Help / Find Object By Name In Assets Folder
« on: June 26, 2019, 06:25:43 PM »
I am creating an item dropping system. When you drag and drop an item out of your inventory, it instantiates whatever object you have in front of the player. Each item has a string variable named "itemID". (I understand item ids are usually integers but I can always change that if strings ever become a problem in the future but that is beside the point.)

Is there any way to find a game object prefab in the assets folder with this itemID variable I have? Every item game object's name is their own itemID.

7
PlayMaker Help / Re: Photon Failed To Network Remove Gameobject
« on: June 19, 2019, 10:50:13 AM »
It didn't work the first time but I just removed Photon Network Destroy and put Destroy Object instead and it worked! Thank you, Jean!

8
PlayMaker Help / Re: Photon Failed To Network Remove Gameobject
« on: June 19, 2019, 10:27:53 AM »
Hi,

 you can't send a gameobject as a variable of an RPC, you need to send the viewID or a reference as a string, that other players can use to find the gameobject you want to destroy.

 Is the game object you want to destroy a networked gameobject?

can you show the state and action where you use that action?

 Bye,

 Jean

The game object I want to destroy may be networked game object. I don't know how it would be considered a networked game object or not. I have the objects on scene first. But when you pick them up, you can drop them and I use Photon Network Instantiate for that.

I think I have gotten it working, though, I haven't tried with two players yet. Here's what I did.

The first image is on the Inventory Manager, on the player.
The second is on an empty game object on the scene.

9
PlayMaker Help / Re: Photon Failed To Network Remove Gameobject
« on: June 18, 2019, 10:55:53 AM »
Hi,

 you just send an rpc to ALL, and then all players receive it, but they all check if they are the master and only the master will proceed.

 Bye,

 Jean

How could I send the game object that needs to be destroyed through, though? Like I said above, "Photon View RPC Broadcast Fsm Event With Data" won't send the event through for some reason.

10
PlayMaker Help / Re: Photon Failed To Network Remove Gameobject
« on: June 17, 2019, 11:33:17 AM »
Hi,

 It would be best to create a post per questions, it will be easier to answer and track progress on resolutions.

- about RPC, I am not aware of any issues with them actions, can you try to isolate this, because it's likely a mix up

- Destroying is also fine, but I guess it depends the context, can you explain a bit more about the setup for the network object you are trying to destroy and how it doesn't work, and what you would expect happening, depending on the context, it cna be tricky ( like you can't destroy something that is no yours, unless youa re the master, so you test with one player, it's fine, but then if you test with more, it starts not working because only one of them is the master)

Bye,

 Jean


Bye,

 Jean

I am trying to make it so when a player picks up an item, it destroys the item for every player. Exactly what you said is what is happening. It works for the first person who joins but since the second is not the master client, it doesn't work. When picking up an item, it has a "Photon Is Mine" action. If yes, it destroys the object for everyone. If no, it sends an RPC to the master client.
My problem is: Where do I put the global transition that I want to send to the master client? I tried making an empty game object on the scene with it but that didn't work. I tried making one onto all players but that didn't work either.

I think one of the reasons it is not working is because it won't let me send what item the player picked up to the master client. I tried using "Photon View RPC Broadcast FSM Event With Data" but it doesn't send the event through.
"Photon View RPC Broadcast Fsm Event" on the other hand, does send the event through.
The action, "Photon View RPC Broadcast FSM Event With Data" seems like it is broken to me. The only reason I need "Photon View RPC Broadcast Fsm Event With Data" is so I can send the game object that the player picked up to the master client so the master client knows what to destroy.

11
PlayMaker Help / Re: Photon Failed To Network Remove Gameobject
« on: June 16, 2019, 11:48:12 AM »
Why, with Photon, is it easier to create objects than destroy them... I've been trying to fix this for so long but I haven't come across any solution...

12
PlayMaker Help / Re: Photon Failed To Network Remove Gameobject
« on: June 15, 2019, 01:50:45 PM »
I found out that it won't call the remote event because "Photon View RPC Broadcast FSM Event With Data" is broken? I tried "Photon View RPC Broadcast FSM Event" and it works but with data doesn't work, for some reason.

13
PlayMaker Help / Re: Photon Failed To Network Remove Gameobject
« on: June 14, 2019, 06:16:33 PM »
Hi,

 you need to do that when you are the owner, a player can not affect what is owned by another player, and only the masterclient is assigned the "admin" role where he can actually do this.

 so, I would look in your logic as to why a player wants to delete an object that doesn't belong to himself. and fix this.

If you want to remove an item for all players, then during the logic where you do that, only the masterclient will execute this. other player will be passive in this process.

so when a player picks up an item, you need to send an rpc to the MasterClient, and the masterClient will deal with this. you can alternatively send an rcp to ALL and each will delete its owned item related to the picked up item mentionned in the RPC.

 Bye,

 Jean

Okay so I am watching this tutorial to see how to do rpc sending and such:
First, at 7:39, he does not use a transition for if the player is not mine. How would that work for the second player joining? That would essentially mean he could not shoot whatsoever.

Also, at 18:15, he sets a global transition to all photon targets, which the global transition is on an empty game object already in the scene. I did this and it didn't call that global transition.

I am using "Photon View RPC Broadcast FSM Event With Data" to carry the game object over to the empty game object, "Item Pickup Manager." The problem is now, it won't call the remote event that I set it to.

14
PlayMaker Help / Re: Photon Failed To Network Remove Gameobject
« on: June 12, 2019, 11:18:48 AM »
Hi,

 the error says: Client is neither owner nor masterClient taking over for owner who left:

 in order to remove a network gameobject, you must be the owner, or you must be the masterClient.

Bye,

 Jean

How would I fix this, though? I need it so when a player picks up an item, it removes the item for all players. The network remove gameobject action was the only way I found that does that.

15
PlayMaker Help / Re: Photon Failed To Network Remove Gameobject
« on: June 11, 2019, 10:10:58 AM »
Hi.
I have edited you post, that yellow hurts to the eye and makes it unreadable :)

You can use the # to place something like this :)

I have no Experience with Photon, but i think you will need to give some more information on how you are deleting and what are you sending thru Photon.

The more information, the easier it is for others to find a solution :)

Sorry about that, I have a dark mode addon for chrome, so the yellow doesn't look bad for me.

But each player has an "Inventory Manager." It's a simple empty game object just to group up the inventory. I'm using a raycast on the main camera. Whenever the player picks up an object, the item that was picked up gets sent into the inventory manager and it sends an event to the inventory manager called "Add item" which gets all of the variables attached to the item, finds an empty array, and stores the variables in the array. The problem is destroying the game object, which I am using "Photon Network Destroy" for that. As I said before, it works for the first client that joined but not the second.

Pages: [1] 2 3