send command from main player to other players to perform local command

hey,

i have a situation where when an event happens, id like to play different videos on up to 5 screens,

i generally have it “working”, currently. each player has its own camera and i am using the following code to get the proper video up on its respective monitor

Network.Instantiate(Video_Cam2, VideoPosition_Cam2.position, VideoPosition_Cam2.rotation, 0);

this gets the job done, but is VERY laggy, when i look at the stats its about 500 to 600 draw calls even though each camera is only looking at 1 video and cant see anything else

how else can i go about this?

is there a way i an send from the master computer (player 0) to the other players to locally only load 1 video?

Yep, use and rpc and send it to the individual player.
Network.instantiate will get called on all players.

i seem to be able to create the object from the following script

but it still creates it for all players, what if i want to create the object only for player 2? command will be coming from the server computer

The rpc needs to exist on all instances but you can send to a specific player.
http://unity3d.com/support/documentation/ScriptReference/NetworkView.RPC.html

function RPC (name : String, target : NetworkPlayer, params args : object[]) : void
Description
Call a RPC function on a specific player

i cant seem to get this going :confused: anyone know of a working sample somewhere on the net?

its saying unexpected token args, so i cant even get past that point to get something going with it

post your code so we can have a look.

i only used the codes right from the script ref, and the bug listed above from the other line of code suggested

problem solved tho (for now) i noticed i was creating the new objects inside of the update with no controls so it was making 5 new objects with movie textures every frame :wink: