Home   Help Search Login Register  

Author Topic: I think this a Tall order. Please take a look.  (Read 1395 times)

0 Members and 1 Guest are viewing this topic.

polvy

  • Guest
I think this a Tall order. Please take a look.
« on: 21 Nov 2003, 11:23:51 »

WHAT IS HAPPENING:
I have a littlebird that is assigned to go to 3 different areas and land for 30 seconds at each to give any players at those locations that take the opportunity to get on board a chance to return to base quickly. Once back at base the Littlebird pilot lands so any players can get out. Then he gets back in and takes off for the next location on his list of waypoints.

WHAT I WOULD LIKE TO DO:
I would like to know if there is a piece of code that would dictate that he only go to each of the 3 locations AFTER their objectives have been cleared. Also, since each objective might be cleared at a different time, I would like him to go to the first that is cleared regardless of it's order in his waypoints.

(Kind of like: IF OBJECTIVE 1 is cleared follow wp's 1,2,3,4,5. IF OBJECTIVE 2 is cleared follow wp's 6,7,8,9,10. IF OBJECTIVE 3 is cleared follow wp's 11,12,13,14,15. Otherwise, stay put at wp 0.)

I know that is a tall order. I have tried to figure it out myself but I can't seem to make the code work. If anyone could help I would credit you in the Mission notes and send you a copy of the mission when it's done.  You would also have my undying appreciation and be teaching me something in the process.This is going to go onthe www.vetsquad.com MP Server.

Many Thanks,
~Polvy


Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:I think this a Tall order. Please take a look.
« Reply #1 on: 21 Nov 2003, 18:54:33 »
When objective is achieved declare a public variable

eg
A_ready = true; publicvariable "A_ready"
B_ready = true; publicvariable "B_ready"
C_ready = true; publicvariable "C_ready"

then have a script running that is looking for these booleans to become true
Quote
#START
~1
?(A_ready) && !(A_Done): goto "FlytoA"
?(B_ready) && !(B_Done):goto "FlytoB"
?(C_ready) && !(C_Done):goto "FlytoC"
?(A_Done) && (B_Done) && (C_Done):EXIT
goto "Start"

#FlytoA
A_Done = true; publicvariable "A_Done"
Do whatever you need to
?(B_ready) && !(B_Done): goto "FlytoB"
?(C_ready) && !(C_Done): goto "FlytoC"
goto "Start"

#FlytoB
B_Done = true; publicvariable "B_Done"
Do whatever you need to
?(A_ready) && !(A_Done): goto "FlytoA"
?(C_ready) && !(C_Done): goto "FlytoC"
goto "Start"

#FlytoC
C_Done = true; publicvariable "C_Done"
Do whatever you need to
?(A_ready) && !(A_Done): goto "FlytoA"
?(B_ready) && !(B_Done): goto "FlytoB"
goto "Start"
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

polvy

  • Guest
Re:I think this a Tall order. Please take a look.
« Reply #2 on: 21 Nov 2003, 19:07:31 »
I'll give it a shot and let you know. Thank you.  :)

polvy

  • Guest
Re:I think this a Tall order. Please take a look.
« Reply #3 on: 21 Nov 2003, 21:50:52 »

OK, I got good news and bad news.

BAD NEWS IS:
I couldn't make it work. I'm just not a scripter yet but thank you for the reply. I do appreciate it.

GOOD NEWS IS:
I found this quote on an Editing FAQ website:

"Something interesting though is that if a medic is placed in a vehicle (say a jeep) and given a support role, he will gladly drive the jeep to your position. This also works for a medic in a chopper he is in command of."

So, I put a medic in a Helo and my players can just call him to their site, take his bird (hehe), and fly back themselves. (Provided that there are still 2 of them left. However if there is just one the MP game is probably over anyway.) I put a HINT in the game to make them aware of this function call. Problem solved...not exactly like I wanted but close enough. Maybe this will be of use to you all some day.

Thanks again,
~Polvy