Home   Help Search Login Register  

Author Topic: Can't get Airwolf to fly!  (Read 5014 times)

0 Members and 1 Guest are viewing this topic.

Offline Gcfungus

  • Members
  • *
Re: Can't get Airwolf to fly!
« Reply #15 on: 14 Jun 2008, 00:00:02 »
Attatching a vehicle to anything can be done. It's not technically attatching it to something, but you can do it with part of a script which would look like this:

Code: [Select]
//Set a counter
_counter1 = 0
//Start the loop
#loop1
//Set the target
_camera camsettarget aP
// Choose what you want as the position - you can play around with these
_camera camsetrelpos [0,-1,5]
//Make the change instant
_camera camcommit 0
@camcommitted _camera
//Add to the time and counter
~0.001
_counter1 = _counter1 + 0.001
//Check if the timer is up - you can change the number
?(_count1 < 5):goto "loop1"
//Other comments
//go here

*This should work*

Also, for finding a camera position, try using the camera.sqs simple put into your units init code:
Code: [Select]
this exec "camera.sqs"You may need to disable any other cutscenes, and you then have a camera which you can move and angle. Just press "control" and it will copy the co-ordinates of your current position. You can then paste them into your cutscene, and the camera will see what you see.

Hope this helps  :),
-=GC=-Fungus1999
« Last Edit: 14 Jun 2008, 00:02:48 by Gcfungus »
The object of war is not to die for your country, but to make the other bastard die for his.
~George Patton

Offline schuler

  • Contributing Member
  • **
Re: Can't get Airwolf to fly!
« Reply #16 on: 15 Jun 2008, 16:24:58 »
look here too, good info,,,,here
Semper Fi

Offline Gcfungus

  • Members
  • *
Re: Can't get Airwolf to fly!
« Reply #17 on: 15 Jun 2008, 23:54:54 »
The link didn't work for me, you need to change it schuler.  :P
The object of war is not to die for your country, but to make the other bastard die for his.
~George Patton

Offline Danakin1

  • Members
  • *
Re: Can't get Airwolf to fly!
« Reply #18 on: 16 Jun 2008, 18:27:07 »
Cool thanks for the info.

I just posted my first Cutscene on YouTube.  Here is the link...
 www.youtube.com/danakinobi

It's only a couple minutes, but it's my first attempt at scripting...

Offline Gcfungus

  • Members
  • *
Re: Can't get Airwolf to fly!
« Reply #19 on: 16 Jun 2008, 19:12:26 »
I like it, scripts work, looks alright. Though you did get some vehicle chat  ??? and it was unrealistic, but good for a first try. You'll do even better, I'm sure.  :good:
-=GC=-Fungus1999
The object of war is not to die for your country, but to make the other bastard die for his.
~George Patton

Offline Danakin1

  • Members
  • *
Re: Can't get Airwolf to fly!
« Reply #20 on: 16 Jun 2008, 22:02:40 »
I like it, scripts work, looks alright. Though you did get some vehicle chat  ??? and it was unrealistic, but good for a first try. You'll do even better, I'm sure.  :good:
-=GC=-Fungus1999

Thanks for the words of encouragement.  I didn't, at the time, know about the "enableradio false" thing.

I'll use that in my next script. :good:

Offline schuler

  • Contributing Member
  • **
Re: Can't get Airwolf to fly!
« Reply #21 on: 17 Jun 2008, 13:36:05 »
hey Danakin  ;)

Quote
I just posted my first Cutscene on YouTube.

i can see the landing gear thingo,
but good job for a first cut,
but you must remember sadly not all addons are 100%
T
Quote
hanks for the words of encouragement.
i am sick of you posting you will be banded  :D :D :D ;) joke,,,, cheers schuler take care and have fun mate!  :D
Semper Fi

Offline Danakin1

  • Members
  • *
Re: Can't get Airwolf to fly!
« Reply #22 on: 19 Jun 2008, 15:16:56 »
I have a question regarding the helicotper's ablility to Pitch and roll.
Is this considered a new topic? or should I continue with this one. ???

Also Gfungus wrote a script earlier regarding getting camera to watch or stay on vehicle as it moves.  Should the "/" be replaced by ";"...?

Offline Gcfungus

  • Members
  • *
Re: Can't get Airwolf to fly!
« Reply #23 on: 19 Jun 2008, 17:39:23 »
I don't think there'd be a problem with continuing this thread. You could rename the thread (is that possible  ???).
When I use the "/", it's used to show a comment. A comment is not read by the computer, but is for users to help them understand the script.
The object of war is not to die for your country, but to make the other bastard die for his.
~George Patton

Offline Danakin1

  • Members
  • *
Re: Can't get Airwolf to fly!
« Reply #24 on: 21 Jun 2008, 18:33:04 »
Cool,
Here is an update!  I was bale to create my first looping script.  This was to allow for camera to follow Helicopter...   :D  Problem is, I can't turn the loop off for it to continue with the rest of the script.   :dunno:
I was hoping to set a timer or some sort of way for the loop to stop.  I tried the set counter thing, but it doesn't seem to be working right.
The idea is to continue with the loop for about 5 seconds then have it goto:"#done" or something like that. 
Any suggestions? ???

Offline Danakin1

  • Members
  • *
Re: Loops and Timers
« Reply #25 on: 24 Jun 2008, 16:24:32 »
So I got the loop part down.  I am able to get camera to follow chopper.
But now trying to turn off the Loop after say 15 or 20 seconds.
I searched around and found a CTR script to add to my loop, but it's not working.
Here is what I worte in the scrtip.
#loop
_cam="camera" camcreate [0,0,0]
_cam cameraeffect ["internal","back"]
_cam camsettarget lady1
_cam camsetpos [3907.60,2249.37,0.24]
_cam camcommit 0
~0.001
_ctr = _ctr + 1

? (_ctr == 15) : goto "done"

gotto #loop


Problem is that it keeps looping.  Does not stop after 15 seconds.
Any suggetions as to what I may be doing wrong?   :dunno:
I'm trying to avoid using triggers and just scrtip it.

Offline Gcfungus

  • Members
  • *
Re: Can't get Airwolf to fly!
« Reply #26 on: 24 Jun 2008, 17:43:21 »
Try changing yours to this:
Code: [Select]
_cam="camera" camcreate [0,0,0]
_cam cameraeffect ["internal","back"]
_ctr = 0
#loop
_cam camsettarget lady1
_cam camsetrelpos [3907.60,2249.37,0.24]
_cam camcommit 0
~0.001
_ctr = _ctr + 1
?(_ctr > 15): goto "done"
gotto "loop"
#done
exit

Should work... Though you may need to play around with the timer numbers
The object of war is not to die for your country, but to make the other bastard die for his.
~George Patton

Offline dr. seltsam

  • Members
  • *
Re: Can't get Airwolf to fly!
« Reply #27 on: 24 Jun 2008, 17:49:51 »
hi,

Code: [Select]

_offX=... whatever you want (in meter)
_offY=... whatever you want (in meter)
_offZ=... whatever you want (in meter)

_tDif=15

_cam="camera" camCreate [0,0,0]
_cam cameraEffect ["internal","back"]
_cam camSetTarget lady1
_cam camSetRelPos [_offX,_offY,_offZ]
_cam camCommit 0
_tMax=_time+_tDif
# loop
_cam camSetRelPos [_offX,_offY,_offZ]
_cam camCommit 0
~0.01
? _time < _tMax : goto "loop"

; i don't know, but you might want to destroy the camera here, or have more camera actions ???
; the destroy code is:
; _cam cameraEffect ["terminate","back"]
; camDestroy _cam


Don't create cameras permanently in a loop, cameraEffect and camSetTarget is enough to have it once before the loop. The value _time means the time that is running since script start. It is an default ofp script variable. Tell me, if all works fine for you...

 :)


Edit:

I forgot something. I updated the vehiclecam.sqs that is in the editordepot a bit. It now has circle-around-capability. In this demo mission here are these camscripts included. The script header will tell you how to use them...
 :cool2:  :cool2:
« Last Edit: 24 Jun 2008, 18:00:50 by dr. seltsam »

Offline Danakin1

  • Members
  • *
Re: Can't get Airwolf to fly!
« Reply #28 on: 24 Jun 2008, 20:53:18 »
Cool...  Thanks for the help and info.  I'll give it a go and let you know.   :good:

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Can't get Airwolf to fly!
« Reply #29 on: 25 Jun 2008, 03:28:08 »
And emmmm goto was spelled wrong (gotto).    :yes:


Planck
I know a little about a lot, and a lot about a little.