Jump to content
Sign in to follow this  
Nailpolish

Scripting help needed (broadcasting variables)

Recommended Posts

So here's my problem, I'm making a multiplayer mission in which a couple vehicles are spawned after the mission starts, then there's an ai dude that has an action on him that makes him get in the nearest vehicle out of a handful in an array, some of them being the spawned vehicles.

This all works fine in the preview of course but not on dedicated, where all the spawned vehicles return an undefined variable.

How do I get the server to broadcast to all clients that vehicles x, y and z have specific names?

Share this post


Link to post
Share on other sites

I think it depends where it was spawned, as in, did you call the spawning of the car from the server? Anything createvehicle on the server is globally available (I think it even is if called from a client)

Share this post


Link to post
Share on other sites
vehicle = createVehicle [blablabla];
publicVariable "vehicle";

Share this post


Link to post
Share on other sites

Broadcasting everything is the wrong approach here.

Missionspecific stuff only really has to happen on the server. If you handle AI and spawned vehicles only on the server, then you don't have to broadcast that. (unless you want to have feedback for the clients)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×