Home   Help Search Login Register  

Author Topic: Commands dont seem to work in MP  (Read 1750 times)

0 Members and 1 Guest are viewing this topic.

onepremise

  • Guest
Commands dont seem to work in MP
« on: 06 Jan 2003, 08:26:19 »
I am having a difficut time getting this script to work consistantly.  Let me explain my situation.  I have a trigger on a map that is activated by a west unit.  Once trigger is activated, a helo is created along with pilots and troops to fill the chopper.  The chopper is then moved to a postion to drop troops.  The only problem is the chopper wont move in MP.  Go figure???  I have tried everything.  Used all the commands available to get an troop to move the chopper.  It just doesnt work in MP.  I am clueless.  The trigger calls my script:

[createh,pilotgrp,paratroops,drophere,attackhere exec "launchattck.sqs"

createh       - Location (Game Logic) where to create chopper
pilotgrp       - an empty group, create a soldier with this in
                     init=pilotgrp=group(this); deletevehicle this
paratroops - use same method as pilotgrp
drophere    - Location (Game Logic) for chopper to drop paratroops
attackhere - Location (Game Logic) for attack location

I have attached my script below.  I am stumped.  I use createunit, moveInDriver, and  domove for creating my pilot and moving the chopper.  You can view the script for more details.  Please keep in mind, i have many other troops running in the background.  I dont think I am beyond the 63/64 group limitation.  Although I may be close, but I have tested to make sure the group limitation doesnt interfere by deleting more troops in the background.  If you test this, please be sure to include a GL object as Server.  Again, this works fine when only one person is connected.  If more are connected, you get inconsistant results.  The chopper wont lift or sometimes some of the troops wont even load into the chopper.  If anybody has any ideas or knows of any bugs that may prevent this from working, please fill me in.  I am running 1.90.

Thanks


Backoff

  • Guest
Re:Commands dont seem to work in MP
« Reply #1 on: 07 Jan 2003, 02:03:15 »
Hello,

I would try to separate the 'unit creation' process with the 'action sequences'. The creation process should be running on the server and the actions on all clients. You also may need to use the group name (which are global variables) to identify your new units on the client part of the script, like (units(group pilots)) select 0.

just a thought, but worth a try :)
« Last Edit: 07 Jan 2003, 02:07:38 by Backoff »

onepremise

  • Guest
Re:Commands dont seem to work in MP
« Reply #2 on: 07 Jan 2003, 03:52:29 »
Ill give that a shot.  Thanks for your input!

onepremise

  • Guest
Re:Commands dont seem to work in MP
« Reply #3 on: 07 Jan 2003, 09:28:47 »
Here is my revised script.

onepremise

  • Guest
Re:Commands dont seem to work in MP
« Reply #4 on: 07 Jan 2003, 09:39:24 »
I still seem to be having problems with the script.  If I move the choppers spawn point around it seems to work sometimes and others it doesn't.  Does setview distance have any effect on createunit?

Anyways, I am still a bit confused at how client/server code is handled by the game engine.  I have already read all the tutorials on the website regarding client/server side variables and commands.  None of them really tell you how your client and server threads execute the same script.  It almost seems as if the code is syncronized between threads or some sort of critical sections are being used by the engine.  In the meantime, I have seperated my Server side creation from the client/server shared commands to move the helo and drop troops.  Now the script waits till all clients have all the troops created and then goes into the shared code to move things around.  Im not sure if I am handling this correctly.  Please see my previous post for the script.  

Im not sure what you meant by using '(units(group pilots)) select 0'.  I thought I had direct access to the units on all clients because I assign the groups global value to a local variable. '_pilotgrp', at the top of the script.  Anyways, I'd really appreciate your help.

Thanks

onepremise

  • Guest
Re:Commands dont seem to work in MP
« Reply #5 on: 08 Jan 2003, 07:19:08 »
 :'( Help!!!