Tripwire Interactive Forums

Go Back   Tripwire Interactive Forums > Red Orchestra 2 / Rising Storm Forums > RO2/RS Modifications > Coding

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-02-2012, 11:04 AM
-=THOR=-'s Avatar
-=THOR=- -=THOR=- is offline
Senior Member
 
Join Date: Sep 2011
Posts: 930
Default Calling client/server functions (mutator)

Hi,

When someone calls Mutate MyMutatorName in the console, it calls the function Mutate on the server. I want the server to trigger a mutator function call on each client. Inside that function, the client must trigger a function call on the server, with a struct as parameter. So basically, there are 3 functions, mutate(...), ClientFunction(), and ServerFunction(param).

So for example, the following execution scenario could happen:
1. Client 1 types Mutate MyMutatorName
2. Server calls Mutate(...)
3. In the Mutate function, the server triggers a mutator function call on each client.
4. ClientFunction called on client 1, and triggers a server function call.
5. ClientFunction called on client 2, and triggers a server function call.
6. ServerFunction("Ack from 1") called on the server
7. ClientFunction called on client 3, and triggers a server function call.
8. ServerFunction("Ack from 2") called on the server
9. ServerFunction("Ack from 3") called on the server

What is the simplest solution to "route" these function calls? What is the syntax required?

Thanks

Last edited by -=THOR=-; 05-02-2012 at 11:25 AM.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:59 PM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright ©2005 - 2013, Tripwire Interactive, LLC