Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Sign in to follow this  
KillerScript

Help| Flashlight sync' over network

Question

Hey, I'm using FPS Kit

And I want to know how to sync my playr's plash lights

That when I will turn my flashlight on, other players will be able to see the light, AND even see the flare that comes from the flashlight.

How can I do that?

This is something that I have:

Please login or register to see this code.

And I'm getting this error:

Assets/Resources/OldScripts/Misc/FlashLight.js(25,9): BCE0004: Ambiguous reference 'light': FlashLight.light, UnityEngine.Component.light.
Edited by KillerScript

Share this post


Link to post
Share on other sites

11 answers to this question

Recommended Posts

  • 0

Is that the whole script? Because it looks like the error is on a line just below the last line of your script.

Share this post


Link to post
Share on other sites

  • 0

ok that script is for all the player lights right? if so, you need an array. use a .FindGetObjectWithTag  type in a function to list all the lights with a special player tag

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this quote.

Dude, I'm sure that there is something much more simple than that, I mean.. I saw more script and non of them talked about your way So maybe there is much simple and easy way, no :)?

Share this post


Link to post
Share on other sites
  • 0

networkView.RPC("TurnLightOn", RPCMode.All, true); //Turn off

 

Maybe, you forgot to set the RPC parameter to false. And I think it should be RPCMode.Others. 

Share this post


Link to post
Share on other sites
  • 0

It's pretty much the same thing except now it enables/disables a lens flare instead of a light.

Share this post


Link to post
Share on other sites
  • 0

How'd you fix it?

Mine is:

 

Please login or register to see this quote.
 
If I add either true or false after AllBufferedViaServer, I get an error: PhotonView with ID 1002 has no method "FlashLightOn" that takes 1 argument(s): Boolean
Edited by XtriMiles

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...