Home   Help Search Login Register  

Author Topic: waypoints & scripts  (Read 587 times)

0 Members and 1 Guest are viewing this topic.

duckwilliamson

  • Guest
waypoints & scripts
« on: 11 Oct 2003, 04:51:45 »
Hi, are wp's global or on the server only?

I ask this because on my map I exec an external script on the wp's of each player ... this executes at the time the person hits the wp so the events always happen right there (lockwp) ...

On the 6 players' waypoints (wp1,wp6,1p13,etc.), I place an: [] exec "lockwp.sqs" which runs a script that sits and waits for the player to finish their task before it unlocks the wp again ... well this works perfectly fine (right now) on the server computer, but the other computer stays locked at the first lockwp ...

I wonder if my commands that involve "player" are creating problems in the scripts in the sense that I am always referring to the server "player" and not the client "player" because the script is running off the server comp ...

Any help or comments would be great ...

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:waypoints & scripts
« Reply #1 on: 11 Oct 2003, 07:08:17 »
I really think this topic should be moved to the multiplayer board.

Hey PointBlank, I wish I could help you, but although I know a thing or two about scripting, I know nothing about multiplayer editing. The people who know a lot about mp are mostly going to be found on that board.  ;D
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:waypoints & scripts
« Reply #2 on: 11 Oct 2003, 08:10:49 »
The server player - soso you never thought about the
possibility that your mission will be played on a dedicated
server then?

OK - first off: you should post more details how you did
what, or it might become a big thread with a lot of answers
just by guessing, where your problem comes from.

player exists on all machines and returns a different unit
on all machines (except on a dedicated server, where
there is no player).

Also you could try using waypoint type: scripted instead
of lock/unlock the wp's.

Why? - because wp - scripted works that way:

let's say there are 3 waypoints:

wp1 - move
wp2 - scripted (in the field scripted, just type: scriptname.sqs)
wp3 - move

what happens?

unit has to move to wp1, when wp1 has been passed,
the script starts running - the unit can now be under full
control of the script, and wp3 will not appear, until the
script has ended.
Waypoint type scripted also automatically passes a few
parameter to that script, which may come in handy to use:

_this select 0 = owner of the waypoint (group)
_this select 1 = position of the waypoint (position array)
_this select 2 = target of the waypoint (e.g: an object
where you placed the waypoint onto)
_this select 4 = dunno - it always returns the value 0, and
also it wasn't mentioned to exist in the manuals - so don't
care about _this select 4  :)

Well, if you want to know more about the waypoint type
scripted, then just head over to this thread, where i
made a more complex description including an example
mission:

http://www.ofpec.com/yabbse/index.php?board=6;action=display;threadid=10697

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

duckwilliamson

  • Guest
Re:waypoints & scripts
« Reply #3 on: 11 Oct 2003, 21:57:23 »
Thank YOU!
Chris, You are my HERO!
This is exactly what I've been looking for!!
I've been using lockwp to lock move wp's while tasks were carried out!
I now use the scripted wp's along with a script that turns the caller into a number (so that when he dies the script keeps running until he finishes his wp)

Anyways! THANKS! You really are my hero!
Cheers to Chris Death!

duckwilliamson

  • Guest
Re:waypoints & scripts
« Reply #4 on: 11 Oct 2003, 21:57:44 »
Thank YOU!
Chris, You are my HERO!
This is exactly what I've been looking for!!
I've been using lockwp to lock move wp's while tasks were carried out!
I now use the scripted wp's along with a script that turns the caller into a number (so that when he dies the script keeps running until he finishes his wp)

Anyways! THANKS! You really are my hero!
Cheers to Chris Death!