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 4 5
I'm working on the same exact type of thing in the Photon world and am having pretty much the same experience.  Not sure where to go from here.

PlayMaker Help / Re: Can't set or change position
« on: July 18, 2013, 09:31:36 AM »
I didn't know prefabs have positions saved in them.  I'm certainly no pro but I don't think they do.

Can you clarify your issue a little better?  Is your prefab saved in your game already and you're trying to move it or is it just a prefab that you're trying to create at a particular place in your game when something happens?

PlayMaker Help / Re: how to make a homing missile
« on: July 18, 2013, 09:21:37 AM »
I am no pro at this, to be sure.  But I think I may be able to help you out.

First you can locate the nearest player with the action, Find Closest and set the tag option to Player or some other tag that you've given your enemies.

There are some other actions you'll need to give your character so he's looking at objects that are within a range of his vision.  This way you're not trying to target mobs behind you.  Unless you want that sort of thing.

Once you fire the missile it can chase the mob if you continually update his transform and feed it back to the missile.

PlayMaker Help / Re: Photon Pickup Manager
« on: July 18, 2013, 09:15:14 AM »
This concept of the Master Player having the only Gold Spawn Manager was flawed.  It works great and spawns gold on all the player's games but there is a major problem.  Every time another player tries to pick up any gold, it crashes and provides the error...

"Cannot call Destroy as we don't control it."

So where can I put this gold spawn manager where any player can pick it up? 

Is there a better way to do this?  Maybe using the Room Properties?

PlayMaker Help / Re: Game will not build and run on osx
« on: July 17, 2013, 09:19:18 AM »
I have the same issue with the 32bit version on the Window's stand alone.

Did this technique work?  I've been messing around with it for an hour and don't understand. 

Do I need a skybox component on the game object? 

Could someone explain this a little further?

PlayMaker Help / Photon Pickup Manager
« on: July 16, 2013, 08:54:52 AM »
Okay, I've had a breakthrough over the last 24 hours with the whole Photon/Multi-Player thing.  I've got a lot of it figured out but before I begin this next step, I'd like a little confirmation or direction.

I now have characters running around picking up gold, chatting, AI chasing them and causing damage to their hit points.  I've got footstep sounds, Dynamic cameras that change positions dependent on what the character is doing and a few other fun things.

I now need to implement a gold pickup manager.  What I have currently are gold prefabs that spawn in at specific points when a new player enters the game.  What I need is a gold spawning manager that finds random locations and spawns in gold after a specified period of time.

The problem with this is that if I create a new game object in the player hierarchy then have it handle the spawning, when a new player comes in more gold spawning will begin... rinse and repeat for every player. 

My plan is to make the Spawn Manager off by default and when the Master Player creates the room, turn their Spawn Manager on.  So, if you're the Master Player it will turn your Spawn Manager on.  Is this a good method?  Just wondering what the standard practice is here.

PlayMaker Help / Re: Photon Players HUD Same As Owner
« on: July 15, 2013, 03:54:16 PM »
Okay, I think we've solved this one.  It's not you guys to be sure.  It's my brain and forcing it to think differently in a multi-player environment.

So here is the setup I ended up with.  Future readers can follow it or ignore it... or perhaps I can get a confirmation that I'm on the right path.

The gold coin needed a lot more work than I would have thought.  This little prefab is doing a good bit of work.  First off, it waits for a trigger.  When you set it off, It gets your player properties and also saves a bool var that it then test to make sure its local.  If it's not then it resets the whole thing.  If the player IS local then it adds a random number between 1-10 to the gold count.

When the player's custom gold property is increased, it alerts the HUD.

The HUD then gets the new custom property number and changes the INT to a String, which it then places in a GUI Box.

One little trick was to also test the GUI Box at the beginning of the game and make sure to only display the local player's GUI.  I was having issues with this thing displaying every single GUI gold Box from every player.

That sound about right?

PlayMaker Help / Re: Photon Players HUD Same As Owner
« on: July 15, 2013, 07:55:27 AM »
Fantastic!  This helps a lot!

So now I'm zeroing in on what it needs to be.  Now I have a specific question that your answer brings up.

Here is my situation:

I Have gold coin that players run into to pickup.  It all works great except it's not giving points to the right player.

The rig looks something like this...

State 1 ) The coin has a trigger on it.
State 2) I needed to find out what player just ran into it so I also store the name of the player in a variable here.  Then I use that variable to call a Photon View Get Owner Properties.

Herein lay the problem because the owner of the player object is always, Player:ME, Regardless of who runs into it.  So when I now update my player, it's effectively updating all of the players.  How do I get the name of a player, not the object the player controls.

PlayMaker Help / Photon Network Get Player Custom Property
« on: July 13, 2013, 12:58:11 PM »
There is a Photon Network Set Player Custom Property.

Why isn't there a Photon Network Get Player Custom Property?

Or am I missing something?

PlayMaker Help / Re: Photon Players HUD Same As Owner
« on: July 12, 2013, 05:20:08 PM »
I have no idea what I'm doing and my head is about to explode.  I've read all the documentation over at Photon so at least I'm more clear on the vocabulary.

Let me see if I can encapsulate the basic concept of running a multi-player game and someone PLEASE tell me I'm right or give me something more to go on.

I've dissected the demo and have come to the conclusion that there needs to be a Game Manager (not unlike what is in the demo) who's role it is to act as the Dungeon Master for all the Players (Actors). 

This Dungeon Master simply listens to anything that happens and who does it, then awards points, damage, gold, items... whatever, to the player who did the action.

Am I at least close?

PlayMaker Help / Re: Triggers On Footsteps
« on: July 12, 2013, 04:45:00 PM »
Okay, it's not the best solution but I think I've found a simple yet effective happy medium.

Here is a good thread to helped to guide me.

I followed his exact setup but added a state to change the pitch randomly.

The triggers still aren't firing perfectly but when you walk or run it's hard to tell cause they're happening so fast.

Not ideal but pretty solid.

PlayMaker Help / Re: Triggers On Footsteps
« on: July 12, 2013, 01:13:39 PM »
I already had a Rigidbody on the collider, so I made the change to Kinematic but it made no difference.

I placed a large, flat cube I could walk on out on the terrain so it would be flat, and it made no difference.  It reacts exactly the same way the terrain did.


PlayMaker Help / Triggers On Footsteps[SOLVED]
« on: July 12, 2013, 10:42:18 AM »
Okay, why does everything have to be so hard?  I really thought this one would be simple... it was actually simple in code but for some reason not so here.

I'm just looking to add footstep sounds to a character... simple, right?  I've done this in code so I thought it would be pretty easy. 

First, I place a sphere at the heel of each of my character's feet.  Set them as triggers.

Now I place an FSM on each of those triggers.  Within those FSMs I have Trigger Event set to On Enter.  When triggered it moves to the second state that generates a random number for the pitch.  The third state sets that pitch and plays the sound.

Bingo!  It works, right?  Well, sort of.  For some unknown reason it's only triggering the sound as the foot comes away from the terrain.

So I set it to look at tags.  I change the terrain to Grass tag and make the FSM Trigger Event fire only when it collides with an object tagged, Grass.

That should do it, right?

Well, not exactly.  Still firing only when the foot comes off the terrain.

What's going on here?

I've learned that it is typically something very small that I've overlooked.

PlayMaker Help / Re: Level Change in Photon Multi-Player
« on: July 12, 2013, 07:21:50 AM »
So if I built my game with a single scene for the menu and the game, can I just add a scene or do I need to split that up to have one scene for the menu and then 1 scene per level?

Pages: 1 [2] 3 4 5