Jump to content
Sign in to follow this  
dragon zen

MP: Basic questions about spawn a soldier and add EH, as well as other MP logic

Recommended Posts

Hello friends:

I'm matching to MP editon and I try to search these basic question but I didn't find the detail, so ask here.

1) Spawn a soldier to player's group.

I know that units in players group will be run on local machine, doesn't it? The question is, if I want to add a new unit, I should run this script on server or on local machine? As well as that, since I need player buy a unit, if unit should create in server, do you have suggestion how to call script ON server FROM local machine? (I think I can only use publicVariable as a mediation, any better approach?)

2) Then, add EH for this new soldier.

If I want to add EH for this soldier, shall I add EH on all client's machine? or local machine? or server?? In fact, I just don't know whether EH is similar to units which will be created and then sync automatically to all machine, or be considered as local one need to add on each machines?

3) In summary, I just don't understand which type of things are auto-sync between machines? For example, Marker? Eventhandler? InitScript for units? Where can I know this knowledge, I think I saw them somewhere but can't find now.

Basic questions, thanks for your help.:o

Share this post


Link to post
Share on other sites

Yes spawning units on a player machine means those units will be local to the player.

EV's are triggered where the object is local (unless you use MPEventHandler).

Have you noticed the local/global icons for commands?

Look at this http://community.bistudio.com/wiki/setPos

You'll se AG and EG at the top

AG :

This icon symbolizes that arguments of the given scripting command don't have to be local to the client (computer) on which the command is executed.

EG:

This icon symbolizes, that the effects of the given scripting command are broadcasted over the network and happen on every computer in the network.

And there's also AL and EL

http://community.bistudio.com/wiki/addAction

AL:

This icon symbolizes, that arguments of the given scripting command must be local to the client (computer) on which the command is executed.

EL

This icon symbolizes that the effects of the given scripting command are not broadcasted over the network and remain local to the client the command is executed on.

Share this post


Link to post
Share on other sites

Thanks, and do you mean that even I use a script in the machine of server to creat a soldier for a player, the AI will also local to that player's machine? I just wondering this point.

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  

×