Jump to content
Sign in to follow this  
Steaksauce1337

Camera.sqs in multiplayer

Recommended Posts

I am trying to create a simple MP mission where I can be the camera and a friend can fly or something. I have him in an A-10 and myself as a soldier on the ground with the "this exec "camera.sqs"" on my soldier. Both are set as playable.

The problem with it is that it makes BOTH of us go into camera mode and not just the one I selected. Does camera.sqs not work in multiplayer? What am I doing wrong?

Share this post


Link to post
Share on other sites

1. name one of the characters "cameraman"

2. if (player == cameraman) then {[] exec "camera.sqs]};

3. profit!

Share this post


Link to post
Share on other sites

I have tried that, naming the units specific names so only that named unit will trigger but it still does for all players.

Share this post


Link to post
Share on other sites

Just do as Rocket says. Theres IS a difference wether you just specify names for units or if you use an "if-block" to check which charakter the player is using.

It's about locality in multiplayer.

Share this post


Link to post
Share on other sites

Just get your friend to quit the camera mode by pressing right mouse button

Share this post


Link to post
Share on other sites
I have tried that, naming the units specific names so only that named unit will trigger but it still does for all players.

The argument passed to the "camera.sqs" script simply tells the camera what to *target*. It doesn't tell it what clients to fire the script on. So you could create an init.sqf file in the mission folder with the following text:

if (player == cameraman) then {[cameraman] exec "camera.sqs]};

That's all you'll need to do, then the script will only fire if the player is the unit cameraman, and the camera will spawn targeting the cameraman.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×