Home   Help Search Login Register  

Author Topic: Heli engine on  (Read 1882 times)

0 Members and 1 Guest are viewing this topic.

Xaio04

  • Guest
Heli engine on
« on: 27 Apr 2004, 11:34:43 »
Does anyone know how to make an engine of a heli instantly start on preview?

Not like to start the engine but for the engine to be on without start-up?

Thanks.

xenofanes

  • Guest
Re:Heli engine on
« Reply #1 on: 27 Apr 2004, 12:31:12 »
You could use setacctime:

setacctime 10
~10
setacctime 1

if you know what I mean. This way the time would pass very fast for one second and then get back to normal, but OFP would think that 10 seconds has passed and the engine should be on (if not, then increase the values). I haven't tried this out, but I guess you could  :-\

Offline Zombie

  • Members
  • *
  • Beware the night, the zombie walks among you
    • USI
Re:Heli engine on
« Reply #2 on: 27 Apr 2004, 12:39:18 »
start it as flying
« Last Edit: 27 Apr 2004, 12:39:52 by Zombie »

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re:Heli engine on
« Reply #3 on: 27 Apr 2004, 12:59:15 »
Yeah what Zombie said. Start it flying but if you want it on the ground or whatever, you can setpos it at a height of 1 or 999999. Whatever you want.
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Xaio04

  • Guest
Re:Heli engine on
« Reply #4 on: 27 Apr 2004, 13:37:13 »
ok thanks i'll try em.

Xaio04

  • Guest
Re:Heli engine on
« Reply #5 on: 27 Apr 2004, 13:42:37 »
sorry, where do you type the setpos and whats the command exactly?

thanks

BrAinOfJ

  • Guest
Re:Heli engine on
« Reply #6 on: 27 Apr 2004, 15:56:26 »
setpos is kinda hard to use....

You have to put it in the init line of the unit (or in a script, doesnt really matter)..
The most common way is to use a marker, and the command getmarkerpos...

The reason for this is that ofp needs an xyz co-ordinate for the setpos command.

There is an even more trick way of getting the xyz co-ordinates to use in a setpos command, and thats by using the built in "camera.sqs" script. To run this script simply put it in an init field of a unit with the following command ' this exec "camera.sqs" ' then preview the mission. Use the controls to move the camera around, and then press your keyboard fire button (default is control or Crtl). This copies the co-ordinates of the camera to your Windows clip board. You can then place them in a script, or paste them in a blank txt file, write them down, and use them in the following command line to be put in your init field....
' heloname setpos [x,y,z] ' where "heloname" is the name you have assigned the helicopter in question... I havent tested it, you MIGHT also have to use the command ' heloname FlyInHeight 0 '

If any of my syntax is incorrect, please forgive me...

csde-PiLLe

  • Guest
Re:Heli engine on
« Reply #7 on: 27 Apr 2004, 17:32:00 »
No offense meant, but using camera.sqs to have your heli on the ground where you placed it is kinda "overkill" ;)

What you will need: The OFP-Editor, the setpos-command and the getpos-command.

Simply place your chopper EXACTLY where you want it to be.

Now, open the unit editing window and set "SPECIAL" to "FLYING".

This alone would make the chopper start in the air - with its engine running.

Obviously, you dont want that. You want the chopper ON THE GROUND, with its engine running.

In the INIT-FIELD, write the following two lines, seperated by a semi-colon (;).

this flyinheight -1  (this will make the chopper STAY on the ground with its engine running)

this setpos [getpos this select 0, getpos this select 1, 0]
(This line will change ONLY the height of the chopper)


What is behind this? Positions are arrays in OFP, consisting of 3 values (x,y,z) which basically represent map-coordinates and altitude.

OFP offers a way to obtain ONE of these values by SELECTing it. Arrays in OFP are starting with "Value 0", then "Value 1", "Value 2" and so on, so SELECT 0 will choose the FIRST value from the array.

What are we doing above?

Well, the line READS as following:

Set the position of this unit (this setpos) to the following array , which begins here ([) The first value of the array getpos this returns (getpos this select 0,), the second value of the array getpos this returns (getpos this select 1,), 0 meters (0). The array ends here. (]).

Cheers
PiLLe

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re:Heli engine on
« Reply #8 on: 27 Apr 2004, 17:42:27 »
Get out of town.   ;)

Put this in the init of the unit,

this setpos [(getpos this select 0), (getpos this select 1), + 6]

Where it says "6" is the height above the ground you can change it whatever you want including "-" a number instead of "+".
« Last Edit: 27 Apr 2004, 17:43:14 by The-Architect »
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Xaio04

  • Guest
Re:Heli engine on
« Reply #9 on: 28 Apr 2004, 07:28:29 »
BEAU - TIFUL

Thanks all.

Xaio04

  • Guest
Re:Heli engine on
« Reply #10 on: 28 Apr 2004, 07:50:00 »
Ok not so BEAU - TIFUL

I tried the this:

setpos [(getpos this select 0), (getpos this select 1), + 0]

which makes the chopper start on the ground with engine on, BUT BUT!!!! the chopper just goes straight back up to its normal height.

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re:Heli engine on
« Reply #11 on: 28 Apr 2004, 13:52:21 »
ok..i tested a few things....first i tried to setpos the chopper at height 0 and give him order to flyinheight 0....this caused the chopper to shortly jump up a few meters in the air and returning to ground.
It seems that the pilot first tries to get a save flight altitude before he follows flyinheight orders. So i thought to setpos it on the ground for a few seconds will keep it there.
So i wrote a short script which setpos the chopper in a real short loop on the ground...just as long till the pilot does follow this flyinheight command....and here's the script

Code: [Select]
;stayput.sqs
_chop = _this select 0
_chop flyinheight 0
_a = 0
#loop
~0.005
_chop setpos [getpos _chop select 0, getpos _chop select 1, 0]
_a = _a + 0.005
?(_a >= 60):exit
goto "loop"

now just exec this script in the init line of the chopper

[this] exec "stayput.sqs"

the chopper now looks a little nervous, as he tries to fly up and is immediately setposed back to ground, thats why the loop has to be that fast. Take a look at it and if you can live with that, this is a possible solution then.

:edit:
you can always declare this shaking as a little earthquake  ;D
« Last Edit: 28 Apr 2004, 13:54:00 by myke13021 »

csde-PiLLe

  • Guest
Re:Heli engine on
« Reply #12 on: 28 Apr 2004, 20:17:23 »
Well, also tried some things.

The following seems to work in the "INIT LINE"
this flyinheight -1; driver this action ["LAND", this]; this setpos [getPos this select 0, getpos this select 1, 0];

The bad news: The helo will still take off for about 3 seconds or so.

I suggest using a black transition from an top-down view to compensate for that or simply having a short camera transition until the chopper is in position. Otherwise, only show the chopper's main body - no rotors - and have the rotor and engine sounds from one chopper BEHIND the camera who is deletevehicle'd in time...

just a few thoughts. ;)

Cheers
PiLLe

csde-PiLLe

  • Guest
Re:Heli engine on
« Reply #13 on: 28 Apr 2004, 20:18:29 »
Note to self: do NOT keep a reply window open for hours while doing other things... NARF... sorry myke ;)

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re:Heli engine on
« Reply #14 on: 29 Apr 2004, 00:35:02 »
lol pille  ;D

Xaio04

  • Guest
Re:Heli engine on
« Reply #15 on: 29 Apr 2004, 13:45:47 »
hmm thanks man, it works and all but yea the shaking gets annoying...

thanks anyway if you get anything else that makes it not shake please post it.

Thanks.