Home   Help Search Login Register  

Author Topic: HELP ! DarnScript !  (Read 413 times)

0 Members and 1 Guest are viewing this topic.

Offline strike277

  • Members
  • *
  • C.O. Of =Task Force Knight~Wing=
HELP ! DarnScript !
« on: 20 Apr 2004, 21:07:58 »
I'm going to try to appeal to a scriptor out there to build me a script. I've tried and tried to do this myself, but to no avail. I obviously am not a scriptor by any means, Even after reading tut after tut and trying to DL already done scripts and adapting them for my own use. Thats why I'm posting this, it's time to go to the experts.

What I need is a script that will allow me to use a moving chopper as the object with fixed, slow zoom, and slow and med rotaion views around it as well as being able to have the camera point to the Passenger in the chopper.

 IF you would be so nice  to put in the script pointing out where I can change the camera abilities, Ie: Object, Swicting away from the chopper to a different object on the ground and then maybe bact to the chopper again.

I will understand if noone whishes to do this, but I'm not sure what else to do at this point. AS I've said I've read Tute, After Tute and just can't seem to get it. I've been trying for a year now off and on. Thanks to any one that would help. pefarris1@cox.net is my email addy.
                                                                       Strike

Offline strike277

  • Members
  • *
  • C.O. Of =Task Force Knight~Wing=
Re:HELP ! DarnScript !
« Reply #1 on: 21 Apr 2004, 08:16:30 »
OK, now that I took the time to post my brain fianly clicked to a point. I'm getting some stuff to work very well now (I don't know why, but I'm not gonna push my luck here.) Any way I've combined  a script with in a script and it works ! The bad news is I cannot end it .

Here is the Primary script

;First we need to create the camera. You got that right.

_camera = "camera" camcreate [7405.37,6594.13,1.22]
_camera cameraeffect ["internal", "back"]

;scene 1

_camera camSetTarget Strike
_camera camSetrelpos [2,1,1]
_camera camcommit 0
@camcommitted _camera

~2

;Scene 2
_camera camSetTarget chopper
_camera camSetrelpos [5,5,1]
_camera camcommit 0
@camcommitted _camera

~5

;titlecut [" ","BLACK In",500]
;Scene 3

_camera camSetTarget gook
_camera camSetrelpos [1,1,1]
_camera camcommit 0
@camcommitted _camera

~5
;Vehile Follow Script. Can be used with any moving unit or Vehicle.
 [chopper,chopper,[-30,15,-10],false] exec "vehiclecam.sqs"

_camera cameraeffect ["terminate", "back"]
camdestroy _camera  
EndIntro=true
exit

And here is the Vehicle follow script.

; concept by Turok_GMT, modified by snYpir

; syntax:
; [<name of vehicle>, <name of unit to target>,
;  <[xoffset,yoffset,zoffset]><relative to vehicle?>] exec "vehiclecam.sqs"

; example:
; [heli, dilbert,[0,0,-10],false] exec "vehiclecam.sqs"






; get camera vehicle and target
_unit = _this select 0
_target = _this select 1

; u can change the positional offsets for the camera (these are relative to the vehicle)
; x offset
_camoffsetX = (_this select 2) select 0

; y offset
_camoffsetY = (_this select 2) select 1

; z offset
_camoffsetZ = (_this select 2) select 2

; do u want your offsets to be relative to the vehicle?
_camrelative = _this select 3

; clear the variable that will stop this script
vehiclecamstop = false

; create a camera
_cam = "camera" camcreate [0,0,0]
_cam cameraeffect ["internal", "back"]








; now create a loop to continuously update the cam's pos
; so it appears to be attached to the vehicle

#loop

_newpos = getpos _unit

; set posn not relative to vehicle?
? NOT(_camrelative) : _cam camsetpos [(_newpos select 0) + _camoffsetX, (_newpos select 1) + _camoffsetY, (_newpos select 2) + _camoffsetZ]; goto "commit"

; set posn relative to vehicle
_cam camsettarget _unit
_cam camsetrelpos [_camoffsetX,_camoffsetY,_camoffsetZ]

#commit
_cam camcommit 0

; aim camera at target
_cam camsettarget _target
_cam camcommit 0


; insert a small update time to avoid anychance of any nasty
; infinity loop errors

~0.01

; perform an if test to see if _stop has been set to true
; of not, do another lap of the loop

? NOT(vehiclecamstop) : goto "loop"








; the loop ends here when vehiclecamstop gets set to true by either
; a trigger or a waypoint's "on activation" field

; once loop had ended, kill the camera and return control to
; player

endcut = true

I can't get the Vehicle cam script to end with the "vehiclecamstop = true"
in a trigger or way point's activation and init fields. What do I do to end the script?
Thanks for any help!    Strike.

Offline Blanco

  • Former Staff
  • ****
Re:HELP ! DarnScript !
« Reply #2 on: 21 Apr 2004, 17:22:00 »
Try the vehiclecamstop = true in your camscript.

Quote
...
~5
;Vehile Follow Script. Can be used with any moving unit or Vehicle.
[chopper,chopper,[-30,15,-10],false] exec "vehiclecam.sqs"
~5
vehiclecamstop = true
...

The vehiclecam should play 5sec with the ~5

To point the camera to the passenger you could use my logiccam...

http://www.ofpec.com/yabbse/index.php?board=27;action=display;threadid=16197
« Last Edit: 21 Apr 2004, 17:47:51 by Blanco »
Search or search or search before you ask.

Offline strike277

  • Members
  • *
  • C.O. Of =Task Force Knight~Wing=
Re:HELP ! DarnScript !
« Reply #3 on: 21 Apr 2004, 21:49:16 »
Thanks Blanco, the timer worked, but I'm still unable to get the thing to end by a trigger. That could be real  usefule.  Now I'm gonna try to use the rotate and the script you put a link up to !!! Lol I feel like I'm finally getting it !