Home   Help Search Login Register  

Author Topic: Traffic question  (Read 521 times)

0 Members and 1 Guest are viewing this topic.

Offline Killzone

  • Members
  • *
  • War is the true Enemy
Traffic question
« on: 11 Oct 2003, 17:15:14 »
Hi all.

I made a small script using the domove command which tells a bus to go to "gamelogic1" wait for 25sec then goto "gamelogic2" wait another 25 seconds then it loops. This is to simulate a working bus schedule. My question is. Is it possible to have the bus complete its drive to "gamelogic1" before it goes to "gamelogic2". See right now I have to ride on the bus and watch how long it takes in seconds between each destination. then put that delay in between each "gamelogic" can I force the bus to go to a specific location and not go to the second location until it has gone to the first no matter how long it takes.  That way I can move the game logics as far apart as I wish without having to ride on it to see how long it takes.

Damn I am awful at explaining. ;D  Hope you can help.


As always thanks for your help
"Everyone dies so deal with it and move on"

                                                      ME

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Traffic question
« Reply #1 on: 11 Oct 2003, 18:55:58 »
Do something like this:

#top
bus domove getpos gamelogic1
@unitready bus
bus domove getpos gamelogic2
@unitready bus
bus domove getpos gamelogic3
@unitready bus
goto "top"

Unitready is a command that retruns TRUE when the unit has completed a waypoint or a domove command. In case you don't know, placing an '@' in front of anything that will return either TRUE or FALSE will make the script wait until that condition is TRUE (It's very useful).

Another way to do this would be to set up a waypoint for the bus at each stop, then place a 'cycle' waypoint next to the first stop. The cycle waypoint makes a group repeat the waypoint closest to the cycle waypoint.

Hope that gets it ;)
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 Killzone

  • Members
  • *
  • War is the true Enemy
Re:Traffic question
« Reply #2 on: 11 Oct 2003, 21:59:41 »
Yes this is what I am looking for. Thanks a lot!!! ;D

BTW I was not aware of the use of the "@"  So that is great

Thanks again General

"Everyone dies so deal with it and move on"

                                                      ME

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Traffic question
« Reply #3 on: 11 Oct 2003, 23:12:44 »
Your welcome  :)
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!