Home   Help Search Login Register  

Author Topic: mhm  (Read 1427 times)

0 Members and 1 Guest are viewing this topic.

Offline Garcia

  • Members
  • *
  • Leeds United is the best football team...EVER!
mhm
« on: 23 May 2004, 00:43:17 »
I got a very annoying problem. I got a mission where I create units to a position on the map and want them to move to another position. It all sounds very easy, but for some very strange reason, they won't move in MP. They will move in preview, but not in MP. I don't know why, no error, no nothing. They just stand there. So, any ideas? anything I could try?

Garcia

ponq

  • Guest
Re:mhm
« Reply #1 on: 07 Jun 2004, 16:42:47 »
are you using local variables in your script?

eg. _movehere?
if so make them public

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:mhm
« Reply #2 on: 07 Jun 2004, 18:21:38 »
So in other words the move command has to be run on all clients(?)
Not all is lost.

Offline Hawkins

  • Former Staff
  • ****
  • Team 2-2
Re:mhm
« Reply #3 on: 07 Jun 2004, 18:43:47 »
Wow, if that's true then... Damn. I've used the move command many times and it's worked, didn't have to make them global/public/whatever. :o What I've seen of this script, I'd say it's the way you execute the script or something like that. Just add everything here with details on what happens/should happen. Maybe we/someone can help.

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:mhm
« Reply #4 on: 07 Jun 2004, 19:56:44 »
Hehe, I think it's actually solved already.

Anyhow, what I ment/half asked, is that if you have a createunit script which has the ?!local server: exit line to exit all clients to prevent the units to be multiplied by clients, and if you have move commands in that script, then you have to let all the clients know about the move command also.
So basicly, from what I've seen about these kinds of scripts here's some working examples.

1. Make the create script run on all clients and only prevent the specific createunit lines from being executed on all clients with the ?!local server: method. Here you can use local variables, since the clients too know run them.

2. Have two parts in the same script. In the first part will be the createunit lines and server side stuff and in the second part the stuff that needs to be run on clients too. This can be done with
a) ?!local server: goto "waitforclient" in the begining of the script
b) clientgoodtogo = true; publicvariable "clientgoodtogo" at the end of the script
c) @clientgoodtogo at the begining of the second section.

3. Have two scripts where the first one will be run by server and then publicvariable the needed info to the second script, which is waiting at all clients for the first script publicvariabling the needed info.
Not all is lost.

Offline Garcia

  • Members
  • *
  • Leeds United is the best football team...EVER!
Re:mhm
« Reply #5 on: 11 Jun 2004, 15:51:58 »
If I remember right it worked after you (Artak) had a look at it and fixed it for me ;D
So yes, it is solved, just forgot about this thread :P Anyway, this is good information for me since I know nothing at all about the local server and that s**t ::)

Thanks guys ;)

Garcia