Home   Help Search Login Register  

Author Topic: How do I make a long flight seem short cleanly?  (Read 1734 times)

0 Members and 1 Guest are viewing this topic.

Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
How do I make a long flight seem short cleanly?
« on: 11 Jul 2003, 21:38:04 »
I need some help completing a MP mission that I am making. I have a squad board a helicopter for a LALO jump some distance away from their base camp. How would I make the flight shorter? Can I use a cutscene in MP and move the chopper via setpos commands while the cutscene is playing? Is the setacctime able to be used in MP and if so does it look too unreal? I would try some of these myself if I were at my own computer but that is not the case. Hopefully some of the gifted editors out there can give me an idea on how to cut down on the flight time so I can get into the action quicker! Thanks in advance for your replies!

                                  Wadmann
Check out my Camouflage Collection! New items added 31 July 2005.

Tactician

  • Guest
Re:How do I make a long flight seem short cleanly?
« Reply #1 on: 11 Jul 2003, 22:26:26 »
I'd use the setPos method.  Put a game logic where you want the chopper to teleport to (somewhere between the base and the destination, naturally) and name it something like telelogic.  When you want the teleport to occur (you could have a trigger detecting the chopper has left base, or whatever), execute a script that looks like this:

Code: [Select]
;; teleport.sqs
;; fades out, teleports the chopper, fades in
?(vehicle player != heliname AND !local heliname): exit
titleText ["","BLACK OUT",2]
~2
?(local heliname): heliname setPos [(getPos telelogic select 0),(getPos telelogic select 1),(getPos heliname select 2)]
titleText ["","BLACK IN",2]
exit

- Only players in the chopper see the fade out.
- Setpos is only run by the person the chopper is local to.
- Relative altitude does not change, only 2d position.
- Make sure your chopper has enough time to gain speed before executing this for a smooth transition.
- Can easily be rewritten to work for multiple choppers by passing heliname or name of logic to the script.
« Last Edit: 12 Jul 2003, 03:24:16 by Tactician »

Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
Re:How do I make a long flight seem short cleanly?
« Reply #2 on: 11 Jul 2003, 23:42:48 »
Thanks for the quick reply Tactician! I would like to clarify a couple of things though.

Quote
Only players in the chopper see the fade out

The chopper is AI controlled and all of the remaining West troops board the chopper. This should not be an issue.

Quote
Setpos is only run by the person the chopper is local to

As above, the chopper is AI controlled. Is this an issue?

Quote
Make sure your chopper has enough time to gain speed before executing this for a smooth transition

I was going to use a trigger grouped to the chopper placed after takeoff in it's flight path so it should not be a problem with speed but...

Quote
Relative altitude does not change, only 2d position

I had increased the flyin heigt a little (20 - 50 meters or so) from the default flyin height as I was having problems with units impacting the ground too fast. I think that I have fixed this with the eject script settings but if not, can the height be increased via the script or should I get the chopper to the correct heigt  prior to activating the trigger?

Thanks again for the script and tips!

                                  Wadmann
Check out my Camouflage Collection! New items added 31 July 2005.

Tactician

  • Guest
Re:How do I make a long flight seem short cleanly?
« Reply #3 on: 12 Jul 2003, 00:06:41 »
An AI-flown chopper will not be a problem, the chopper will be local to the host (server).  And the condition for exiting the script takes a dedicated server into account.

To change the height of the chopper after teleport, just add a few meters to the setPos line..

Code: [Select]
?(local heliname): heliname setPos [(getPos telelogic select 0),(getPos telelogic select 1),(getPos heliname select 2) + 20]
And I owe a big "oops" for trying to use italics in a code clipping  ::)

Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
Re:How do I make a long flight seem short cleanly?
« Reply #4 on: 12 Jul 2003, 01:18:40 »
Thanks again for a prompt reply!

I am happy to see that you included the line to increase the height during the cutscene as it looks funny when the chopper stops at a waypoint the procedes vertically until it reaches the desired height.

As for your "oops", I almost asked in my second post if that is what you were attempting but on the "reply" page, it was italicized!

I will check this out tonight and close this thread if I have no further questions.

                                             Wadmann
Check out my Camouflage Collection! New items added 31 July 2005.

Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
Re:How do I make a long flight seem short cleanly?
« Reply #5 on: 12 Jul 2003, 10:30:24 »
Unfortunately this did not work. The screen faded out and then faded back in like it was supposed to but I was no futher along than before.

I have double checked my spelling just in case it was something minor like that but I am pretty sure everything is named properly.

Any ideas why it is not working correctly?

                     Thanks!


                                   Wadmann
Check out my Camouflage Collection! New items added 31 July 2005.

Tactician

  • Guest
Re:How do I make a long flight seem short cleanly?
« Reply #6 on: 12 Jul 2003, 20:15:01 »
What's the condition of the trigger calling the script?

A quick fix should be to remove "?(local heliname): " from the setPos line.

Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
Re:How do I make a long flight seem short cleanly?
« Reply #7 on: 01 Aug 2003, 19:41:37 »
Sorry for the delay in responding to your "fix" for my problem but due to a "traumatic life experience" (married on June 29), my OFP time has been very limited. The original code worked just fine as it was my error. I had modified your script to change "heliname" to "chopper1" but I screwed up and did not put the modified script into my mission folder. :-[

Thanks for the help!
Topic solved and locked!

                                 Wadmann
Check out my Camouflage Collection! New items added 31 July 2005.