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.

Topics - Swift_Illusion

Pages: [1]
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.

Playmaker Help / Quick question - change a photon objects 'owner'?
« on: October 09, 2013, 10:49:35 PM »
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.

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)

We just finished our first game with Playmaker for the ludum dare October challenge 2012.
I really hope that take some time to try this out, would greatly appreciate it :)!
A trailer can be viewed here for it -

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!

I've got a frustrating bug where I'm trying to get a game object form a scene, which because I'm trying to get that with prefab that is spawned into the scene, I can't simply get the game object, I have to get it's game object 'property' and assign that to a value, and use that value in the FSM.
The problem is, as soon as I try and build the game, the 'get property' object reverts to it's original state (as if you had just added it from the action manager) and so the game bugs out and it doesn't function.
It only does that when building the game, not when pressing the play button to preview it through the editor.
Currently my only workaround is to have the objects hidden in the actual scene and clone them, and in the FSM get the game object directly without using the 'get property' action.

I just updated to the latest playmaker, and I went to import my characters from older scenes,
and now none of them are functional.
New playmaker FSM components are added as "Script" instead of "Play Maker (FSM) Script",
reason for not being able to use my characters now?
Also in release notes of latest version
"Global events no longer need to be exported/imported."
How am I meant to get my globals imported now? I've tried but it isn't loading into this version.

Could you please let me know how I'm meant to upgrade to the latest version with my old assets?
I've just gotten into work on a schedule and this has caused a great hassle,
I'd greatly appreciate a method to get my old FSM objects working as soon as possible.

I'm having trouble with multiple characters in the scene and I believe the root cause is that
I'm in control of both of the characters, instead of a single one and receiving information from
the server on how the other player is acting. All events etc are triggered on both characters too
(for example the left click to 'attack' is being triggered by both characters).
Is there some easy trigger for this where I can enable/disable control depending on who the owner is?
I'd greatly appreciate information on this as I can't move forward at all without fixing this.

I have a problem with my character which uses a character controller, when trying to move it manually.
For its jump I've used 'iTween Move By' to move the character up, however the problem is that this
and every other forced movement, causes the character to ignore collision (if an object is above it
when it jumps, it will go through that object).
So my question is, is there some way to keep the character colliding so it won't go through that surface?
I'd greatly appreciate some help with this.

Hi Swift_illusion,

I think you are indeed confused with the network "view" system and what a playmaker global means in a multi player context. I also think that you are confusing Global Events and Global Variables, they do use the same "global" word, but in our case, this is very misleading unfortuntly ( I think global events should be simply called events, and that events should be made "public" for other to see them, not "global").

-- A playmaker global, synched over the network, is something that can not be used to define a property that belong to a particular player. Because there will be several players, EACH of this player would share the same value, because the global variable IS syncehd over the network.
-- A playmaker global, NOT synched over the network, is NOT fine neither, because all players are prefab so they work the same, and they would ALL try to access the same global, so imagine storing the name of your player in a global... you create the room, fine, the global string has your name, if someone else, joins, the global gets overwritten with the name of the new player that joined the room... not good.
A global variable synched over the network should only be used to represent a property of the environment in general, not something that is meant to be specific to the running instance ( a player, an enemy, etc etc).

Now,  A Global Event is necessary even within a player Prefab, and even within the multi player envirnoment because, to communicate between Fsm, Global Events are necessary. You can fire a Global event to a very specific Fsm, this is not "global" as "everyone will get it", it's a "public" Event as "I am listening to a Global Event is someone wants to communicate with me".

If these concept are not fully grasp, We need to discuss this more, on another thread, because this is core to playmaker and how Fsm are built.

Now, for your example, completely remove global variables from your thinking process ( for now ).

-- keeping "state" as you describe it: Study how the animation of the character is handled in the demo, this is very much how I would suggest you implement your character state as well.

   1: the current animation playing for the player is stored as an integer, 1 if for idle, 2 walking, 3, running, 4 jumping.
  2: this integer is stored in the "variable synch repository" Fsm of the player in variable "Animation (synched)"
  3: In "Animation synch" Fsm
       IF this player is mine, then I MUST set Animation (synched)
       IF this player is NOT mine, then I MUST read that value and FORCE this player to match the animation integer

So, for states it would be the same, have an integer ( integer are smaller than strings, so they are more efficient to stream over the network then strings, but you can use string if it is easier for you to begin with, not a problem)
make that state variable synched over the network, and have a fsm responsible for either setting that state or reading that state AND force it to reflect that state.

If you don't understand this, I think I will do the following:

 Extend the demoWorker with a weapon. I am thinking that the best way to illustrate fully your dilemma would be to let the player drop a "mine" ( no pun intended (no "PUN" intented) :) ), or let's call it a bomb.

Ok, as the user drops a bomb, this bomb would explode if another player touch it, if you touch it it doesn't explode. This would totally illustrate the "is mine" concept, because the bomb would be instanciated by the same application instance as the player ( I hope you are following me here), the bomb belongs the player. so when a player would hit the bomb trigger, the bomb would check that the player "is mine" or not, if it is not, then it means it's another player, and BOUM.

 In short: A player and ALL objects instanciated over the network by the same running instance ( by running instance, I mean "running application")  would respond to "is mine" to true in that running instance.

I hope I did not wrote any nonsense, it's late here :) I think your question is very important to many to properly grasp how to build multi player apps. So I am really willing to get to the bottom of this and be as clear as possible. So do not hesitate to quote and ask for clarification where you require it.



Firstly thank you once again so much for the knowledge you are taking the time to share! However
"If these concept are not fully grasp, We need to discuss this more, on another thread, because this is core to playmaker and how Fsm are built."
Regrettably I do have quite a few things I need to ask/confirm/expand on so I took your advise and posted
this in help as I agree it would be helpful for others who are having the same problem and might find
solutions here.

I'll start with global events as I believe I understand what your trying to speak of here most.
Because when using global events, you are sending them to specific objects for that object to read it.
However what I'm not sure about is, if you have 2 instanced characters, if you have an event sending to
"Event target : Game Object
Game Object : Use Owner"
Will that event be read by every instance of that object? Or does it in the multiplayer area still understand
when it is it's 'own' object, a.k.a if you send a global to another FSM on your character object to turn it
green, the other 'characters' won't read that event?

About global variables, from what you have explained along with looking at the photon character again
observing with what you have tried to explain, would you instead use an FSM to 'store global variables'?
So instead of reading/writing to a global variable, you would instead get/send variable changes to a single
FSM like the 'variable synch repository' FSM on the photon character?
So basically between every 'action' I wanted my player to take, I would add this 'is mine?' check before
it, and set or get the data?

If you may find the time at some point your 'mine' or 'bomb' (puns are always puns no matter how unintended :D)
example that would be a great addition to the demo and would really help expand the reference of
photon view being used and would be greatly! appreciated :)!..

Hopefully I'm starting to get a grasp of this? Or am I still not quite understanding the multiplayer environment?
Also, does this mean the entire game would need to be developed in the multiplayer environment, as from what
I understand it's going to be a massive addition of changes necessary to work in the environment.
Also if you know, does running the demo with yourself chosen as the Photon host consume bandwidth?

I have no idea why but for some reason only an object with character controller will detect
a collision, where as I've tried both box and sphere colliders and they don't work at all.....

I'd appreciate any information that can be provided about this greatly as it's something I need for my project.

Note:I've also tried these with RigidBody too but it doesn't seem to work-as a side note if this is required (which it seems to be) and I'm just missing something else somewhere, can it function with gravity turned off and does that reduce it's impact on the games performance? Or does the RigidBody impact the performance as a whole.

I'm wanting to build a character controller with playmaker, because though I've found a great script that does all I want, it will be really hard to do things like stopping that control when in dialogue or changing the gameplay because I'm not a programmer that's able to interpret or understand how to control it through playmaker.
However one of the big parts of it is that it was able to automatically stop a character walking up a hill at
a specific angle (so if the mesh was angled over 50 degrees the character couldn't walk up it, etc), and I
was wandering if this is something that could be re-created with playmaker controls?
And if possible where might I start?

I'd greatly appreciate any information regarding this, thank you for taking the time to read this :)

Pages: [1]