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

Pages: [1] 2 3
1
Playmaker Help / Re: Photon RPC event to specific instantiated object?
« on: October 15, 2013, 09:33:48 AM »
To try and explain it better,
as an example and not my current usage for it-
I have a player prefab, and in each client that player prefab
will be instantiated, when a player joins the game.
So 5 players have joined the game, 5 instantiations of that prefab,
and now I want one of them to when colliding with an object,
have an event occur.
I can't be sure that the player will actually collide with that
object in every client because of the way it's synched-you might
move away and the synching skip the frame you would have
collided with that object in another client and so the event
wouldn't trigger, causing a problem.
So I want the scene that is the owner of that object to send
an event to that specific players 'object' across all clients with a
"Photon View RPC Broadcast FSM event" action.
The issue is this will send that event on every player because they
are all instantiated from the same prefab.

No matter what I've tried, I can't get it to just send it and only affect
the player object I sent the "Photon View RPC Broadcast FSM event" action with.

Note:
I have set it up correctly, using "Game Object" for the 'Event Target',
and "Use Owner" for the 'GameObject'.
Also my reason for needing it won't be solved by sending a normal
event and just checking if it's the owner or not, etc.
I want to be able to send an event to a single instantiation of a prefab,
across all clients-not every single instantiation of that prefab.

I hope this example makes more sense, really sorry about the confusion that seems to keep happening.

2
Playmaker Help / Re: Photon View
« on: October 14, 2013, 07:10:48 PM »
What you need to do is drag the FSM that contains the variables you want to synch to the "Observe" area in the Photon View Script.
Also make sure in the Variable area of the FSM you have ticked "Network Synch" for the variables you want synched over the network.

3
Playmaker Help / Re: Photon RPC event to specific instantiated object?
« on: October 14, 2013, 07:12:15 AM »
Yeah I know you can target individual players, as in their client,
but that isn't my problem.
The issue here is being able to target a specifically instantiated object
across every client. I know you can relay some information by through synching,
like how the movement/rotation is synched across each client, however that information is owned by a single client.
I want send an even that event that will act in every client because I have
a different action based on whether it's in the client that owns it, or the other clients that don't own it.
However if I have 2 of these objects instantiated, it will activate that event on both objects.

What I'm trying to achieve is an event to be sent when a player collides with an object, however I can't send it individually by targeting the object hit and sending a GameobjectFSM event because if the player moves away from the object too soon, with the synching across the network it might not actually collide on some clients.

Also for situations where I'd need to trigger the death of a player, I can't target the individual player object across all clients through any means, or at least none I've found.
Currently I have to freeze my player and instantiate an object across the network which when colliding with the player object, it destroys it.
Because everything else I tried, the latency causes issues between clients.

I already studied the demo's before starting the project but they don't help with this situation.

4
Playmaker Help / Photon RPC event to specific instantiated object?
« on: October 13, 2013, 05:29:05 PM »
I'm trying to setup actions for players, that are a player object instantiated with every client that joins, but when trying to send an RPC event to the character it sends it to every single instantiation of that object.
So I can't target player 1 or 2 individually for things like death/restarting/etc in any easy manner. I've even tried renaming the object but it still picks up that they are both instantiations of the same prefab and sends the RPC to all players.

I'd really appreciate knowing if there's a way to target specific instantiations of an object throughout the network because it's really hard at the moment to try and get any change to happen easily for a player, especially when there's any lag.

5
Playmaker Help / Re: Quick question - change a photon objects 'owner'?
« on: October 10, 2013, 01:42:14 PM »
The problem is if I ask I'll just be sent back here because it's related to Playmaker and I wouldn't know the first thing about trying to program it manually.
I've found some simple looking code though for a method to switch the owner by an exitgames staff member.
The second option shown here.
http://forum.exitgames.com/viewtopic.php?f=17&t=1387#p6589
Do you know how this might be used as a custom action?
(Also the 'TODO' mentions "This code works fine if we have a game where no other players can join while a game is in progress.", that's fine for my type of game as new players won't be able to join after the game has started).

6
Playmaker Help / Re: Quick question - change a photon objects 'owner'?
« on: October 10, 2013, 05:18:32 AM »
I've been searching for a solution for synching the physics of my project,
and I've searched everywhere about synching physics with unity and photon and the majority of answers refer to transferring the 'ownership' of the object, to each player that collides with it. So it must definitely be do-able, but there doesn't look to be an action for it.

To elaborate further with a reference, it's like when instantiating the player over the network. The client that instantiated that player is the owner of that object, and you can synch the position to other clients with Photon View observing the FSM and in the other clients setting the position with lerp.
Your solution sounds like it would work, but not for a physics situation.

The reason you want to transfer the ownership is so that the player actively colliding with the object is the one driving its change, because otherwise you would keep going through objects, with the delay of sending your position to the server.

7
Playmaker Help / Quick question - change a photon objects 'owner'?
« on: October 09, 2013, 10:49:35 PM »
Hello,
I'd like to know how to change the 'owner' of a photon network object,
so that I can transfer the ownership of an object between players.
I've taken a look through the Network and Photon playmaker actions,
but I can't seem to find anything relating to ownership changes,
only getting information about an owner/checking who owns an object.
For example when a character collides with an object I'd like to change the ownership to that characters client.
I'd greatly appreciate a response in regards to this.

8
Playmaker Help / Re: Photon Instantiate-object spawn point being ignored?
« on: October 09, 2013, 10:23:30 PM »
Thank you so much for taking the time to test it.
I was 100% sure it wasn't anything to do with conflicts so after some more head scratching trying to workout how it would work for you, I discovered the solution.

You need to use NetworkView for the object to instantiate correctly. I had imagined with it using the Photon Network that PhotonView was what you needed but that wasn't the case, at least as far as instantiating goes.

9
Playmaker Help / Re: Photon Instantiate-object spawn point being ignored?
« on: October 07, 2013, 08:23:43 AM »
Thank you so very much for that, I greatly appreciate it!
Goodluck with the testing :)!

10
Playmaker Help / Re: Photon Instantiate-object spawn point being ignored?
« on: October 07, 2013, 05:29:01 AM »
I have an I have an object, called "TOOL_BuildingGenerator_Group1".
On that object is an FSM, which is instantiating pieces of a building relative to it,
as shown here where "TOOL_BuildingGenerator_Group1" is specified as the spawn point.

The building has a random amount of floors, so each time it runs through all the pieces of one floor, it adds a Y value to the "CityGen_HeightGrowth" vector 3 variable, which acts as an offset from the location of "TOOL_BuildingGenerator_Group1", and builds the next floor "Y value" higher.
Once it has finished, "TOOL_BuildingGenerator_Group1" will be moved in a certain direction and begin generating the building at that location.
This way I can randomly generate streets of buildings (which I require for my project).

This all worked perfectly fine, until I started trying to instantiate the building pieces across a server.
In the host where the building generation FSM runs, it works fine. But when I open another window as a player and join that room, no matter what I try, it ignores the X/Z offset "TOOL_BuildingGenerator_Group1" should be giving it as the chosen spawnpoint object, and the building shows up at 0,0,0.
As the tests in my previous post shows I've even instantiated "TOOL_BuildingGenerator_Group1", and gotten its position as a vector 3 variable and manually added it to some of the pieces as a test, but it still gets ignored.
The photon view of the object is the prefab itself selected


I really don't know where to go from here or what else I can test or if it's something I'm missing or a bug but I feel if it's a bug this is something that should seriously be working as I already know a lot of situations in my projects where creating an object from a spawnpoint will be required.

11
Playmaker Help / Re: Photon Instantiate-object spawn point being ignored?
« on: October 06, 2013, 07:28:36 PM »
The results of some more testing.
I tried instantiating the actual object holding the building generation FSM (which was also the object I had specified as the original spawn point for the pieces), wondering if it might not have instantiated the position correctly because the object its spawn point was referring to didn't exist.
Regrettably that didn't fix it either.
Below is a screenshot of the FSM in a players window (where the building isn't being instantiated correctly).

So it does know where the spawn object is, but it still won't spawn objects relative to that.

A second test, I tried to just get the position of the spawn object, and add the resulting Vector3 to the offset Vector3, and used the resulting vector as the spawn position (so the 'Spawn Point' was left empty),
however it STILL seemed to ignore the spawn objects position as if it got it at 0,0,0, even though while debugging the player scenes the building generator is spawned at the correct location, so the building pieces shouldn't be getting created relative to the center of the world.

I seriously don't have a clue what else I can try here, I'd greatly appreciate any help I can get with this.

12
Playmaker Help / Re: Photon Instantiate-object spawn point being ignored?
« on: October 03, 2013, 11:35:56 PM »
Here's the action that creates that object.

In the window that this FSM runs, the object is built in the correct position, relative to the "BuildingGenerator" object.
However in all the other windows it is instantiated in, it is built relative to (0,0,0).
It still correctly accounts for the "CitgyGen_HeightGrowth" and "CityGen_RotationV" offset in the other windows, but ignores the object Spawn Points influence.

13
Playmaker Help / Re: Photon Instantiate-object spawn point being ignored?
« on: October 03, 2013, 07:05:01 AM »
Thanks a lot for the response.

Here's the photon view, the target is the prefab object/itself.

14
Hello,
I've been trying various methods to try and solve this but in the end I believe the only problem left that could cause my issue is playmaker itself, possibly a bug, or maybe something I've missed?.

I'm instantiating multiple objects that have their position/rotation adjusted from the location of a specified object. It shows up in the right position in the window I'm creating the objects from, but in all the other players windows, the objects are created relative to the center of the world (0,0,0).
So it seems to be ignoring the base position/object spawn point it is meant to be adjusting from, and just starts from 0,0,0 in other players windows.

(I do have all the photon view/object proxy, etc scripts setup correctly)

15
We just finished our first game with Playmaker for the ludum dare October challenge 2012.
http://www.ludumdare.com/compo/2012/11/01/blob-cannon-midnight-tinkerings-first-game/
I really hope that take some time to try this out, would greatly appreciate it :)!
A trailer can be viewed here for it - http://www.youtube.com/watch?v=wjeIXterojw

Playmaker has been an absolute blast to use and I wouldn't have been able to develop games
myself beyond my ideas without this tool, so a massive amount of thanks go to everyone who
has put time and effort into furthering the quality of Playmaker!

Pages: [1] 2 3