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 - Fletch

Pages: [1] 2 3 ... 5
1
PlayMaker Help / Re: Photon Pickup Manager
« on: July 30, 2013, 08:58:36 AM »
Actually, the coin counting is working great.

Let me see if I can explain this a little better.

1) Player A instantiates and his Coin Manager FSM instantiates a coin.  Player A is the owner of that coin.  It has been instantiated by photon and exists on everyone's game.

2) Player B instantiates into the came and his Coin Manager FSM instantiates another coin.  It also has been instantiated by photon and exists on everyone's machine.

Player A can pick up their own instantiated coin without any issues.  Photon destroys the coin and it vanishes from everyone's game.

Here comes the issue.

When Player A tries to pickup the coin that was instantiated by Player B, it fires off an error saying that you can't destroy an object that is owned by another player.

So I have to query Photon to find out who the owner of the coin is and tell them to destroy it.  Only problem is that when Player A tries to tell Player B to destroy it (using the RPC Call) I can't pass the game object to destroy.

2
PlayMaker Help / Re: Photon Pickup Manager
« on: July 30, 2013, 06:12:15 AM »
So it the coin isn't owned by the player, what then?  How can you consume it?

3
PlayMaker Help / Re: Photon Pickup Manager
« on: July 29, 2013, 08:24:30 AM »
Thanks for the reply! 

What I have is a gold pickup that instantiates on when the player spawns in. 

With each new player a new gold pickup spawns in.

so if I have 5 players there are now 5 gold coins waiting in the world to be picked up.

The coins are built with a trigger.  When a player tag enters the trigger then is suppose to destroy itself.

Simple in single player mode.  Like most everything else, much more complicated with multiple players on Photon.

The problem is derived from the fact that "Player A" cannot call a destroy game object if "Player B" was the one that instantiated it. 

Okay, so I have to make an RPC call to the owner of the object and tell the owner to destroy that object.

Only problem is that when the picked up coin makes that RPC call, and the owner of the object catches the event info, it doesn't have a clue which object to destroy.

I know there are other ways around this issue.  I could rename every coin that is instantiated as they come into the world and then pass the unique name through to the player as a string... but that seems rather clumsy to me when the event info action literally has a place for what object sent the call in the first place... it just work with RPC calls.

4
PlayMaker Help / Re: Photon Pickup Manager
« on: July 25, 2013, 06:19:31 AM »
Man, if the Photon View RPC Broadcast FSM Event To Player action would just send the right game object to the Get Event Info action this whole issue would be mute.

Check out my other thread about the Photon View RPC Broadcast FSM Event To Player action having a bug in it.

5
PlayMaker Help / Re: Photon Pickup Manager
« on: July 25, 2013, 06:14:07 AM »
Update:

I'm understanding more each day about the photon network setup and structure.  It would really have helped to have a simple diagram that would explain how the system works to begin with. 

The best pickup solution seems to be an FSM gold manager that keeps a running total of the gold currently in game, renaming each coin that is spawned in.

There is also a synched variable that increments with each new gold coin spawned.  This variable is used by each client to rename the new gold coin.

There is an issue with a new player spawning in who's gold coins already in game won't be renamed yet.  Not sure what to do there yet

6
PlayMaker Help / BUG - Photon View RPC Broadcast FSM Event To Player
« on: July 24, 2013, 11:37:42 AM »
Alright, I've been messing with this now for over a week and have a few things to report.

I've actually got the Event To Player to fire but only when the action that is catching the event is on the same object.  That seems like an error to me but whatever.

The next issue, and the biggest one in my opinion, is when you do manage to get the thing to fire correctly, it doesn't send the right game object that it was fired from.  I'm catching the event with a Get Event Info, where I'm capturing the Game Object and a string that was sent when the event was broadcast to the player.  It sends the string fine but then gives me a game object which I know for a fact didn't send the message.  In fact, I can turn off the FSM which the Get Event Info says is sending the message and then it just gives me some other game object. 

When I use the exact same Get Event Info with the Photon View RPC Broadcast FSM Event to all players then the correct game object is delivered.

This then leads me to believe that there must be something buggy about the To Players version of the Photon RPC Broadcast.

I used the Chat Users List FSM as the model for mine and the difference was that in the Get Event Info, the chat never looks to see what game object sent it.  So as a test, I decided to create a phony game object variable and plug it into the Get Event Info within the chat FSM and sure enough, it's saying the event was fired off by some random game object.  This would indicate that the Photon View RPC Broadcast FSM Event To Player has a bug in it.  Cost me a week to figure it out.   :'(

7
Action Requests / Find Game Object From ID
« on: July 23, 2013, 03:59:25 PM »
It would be nice to be able to find a game object by it's ID number in the game.  No way to do this currently

8
PlayMaker Help / Re: Photon + RPC
« on: July 22, 2013, 05:50:17 PM »
Alright, after a bit of testing and days of tireless crying, I've come to some stark realization.

The Photon RPC Broadcast FSM Event To Player only works if there is more than 1 person in the room.

9
PlayMaker Help / Re: Photon + RPC
« on: July 19, 2013, 05:37:43 PM »
Question:  If only one person is logged into the Photon room, does the Photon View RPC Broadcast FSM Event to Player action even fire? 

My whole rig works if I use Photon View RPC Broadcast FSM Event but then when I try to send it to just a named player, it doesn't.

However, it does fire if there are multiple players in the photon room.

Can someone please tell me what's going on there?

10
PlayMaker Help / Re: Photon + RPC
« on: July 19, 2013, 11:21:23 AM »
Spoke too soon.  RPC broadcast event to player isn't working.  :(

11
PlayMaker Help / Re: Photon + RPC
« on: July 19, 2013, 09:31:49 AM »
Figured that one out. 

Even though Photon View RPC Broadcast FSM Event has a place where you can put a string target, it didn't work.

I used Photon View RPC Broadcast FSM Event To Player and it worked.

12
PlayMaker Help / Re: Photon + RPC
« on: July 19, 2013, 09:15:05 AM »
Yup, I'm having the same exact issue.

I'm making a gold pickup system for multi-player.  When I pickup a gold it crashes cause the pickup player is not the owner of the game object that it tries to destroy.

So I'm using RPC to broadcast a Destroy Gold Pickup event to the player who owns it. 

It all works great right up until the point where it's suppose to send an RPC event to a Photon target from a string.  The Player Name String variable is there but for some reason it continues to send the event to everyone and not the player's name who is in the Photon Targets From String variable.

13
PlayMaker Help / Re: Photon Pickup Manager
« on: July 18, 2013, 04:55:45 PM »
Okay, so here is my report.

I tried to make the Master client own all the gold prefabs as they were created and then fire off an RPC call to the master, which would destroy that prefab when anyone picked it up.

There are still errors in this model as now when the Master Player disconnects from the game he will take all the gold prefabs with him. 

There must be a cleaner, more simple way. 

I'd love it if room custom properties could do what I'm needing but I don't know if they can. 

Can anyone help me?  Is this what room properties are for or can they be used for this sort of thing?

14
PlayMaker Help / Re: Can't set or change position
« on: July 18, 2013, 10:48:12 AM »
I know for network games you can instantiate anywhere.  I haven't had an issue with it in my pickup FSM that spawns gold in various places.

15
PlayMaker Help / Re: Photon Pickup Manager
« on: July 18, 2013, 10:25:21 AM »
I guess I could send an RPC call to the master and have it erased from that end but that seems really clunky.

Pages: [1] 2 3 ... 5