Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: Follow it  (Read 658 times)

0 Members and 1 Guest are viewing this topic.

Skanderborgvej

  • Guest
Follow it
« on: 11 May 2004, 19:35:17 »
Does anyone know a script that allows you to follow a bullet/missile (to be used in a cutscene ofcourse)?

Thanks...  ;)

GRTZ

Offline Blanco

  • Former Staff
  • ****
Re:Follow it
« Reply #1 on: 11 May 2004, 22:17:03 »
Try this

Put this in the init of your unit
Code: [Select]
this addeventhandler ["fired",{_this exec "Follow.sqs"}]
then the followscript
Code: [Select]
;follow.sqs
_shooter = _this select 0
_ammo = _this select 4

_projectile = nearestObject [_shooter, _ammo]


?!alive _shooter : exit


?_ammo != " What ammotype should I follow?" : exit


_shooter removeeventhandler ["fired",0]

#start
_camera = "camera" camcreate [0,0,0]
_camera cameraeffect ["internal","back"]
_camera camsettarget _projectile
_camera camsetfov 1
_camera camsetrelpos [0,-3,0]
_camera camcommit 0

#projectileloop
?isnull _projectile : goto "destroycam";
_camera camsettarget _projectile
_camera camsetrelpos [0,-3,0]
_camera camcommit 0
goto "projectileloop"

#destroycam
_camera camsetfov 1.8
_camera camcommit 0
@camcommitted _camera
~2
_camera cameraeffect ["terminate","back"]
Camdestroy _camera

_shooter addeventhandler ["fired",{_this exec "follow.sqs"}]
exit



btw : Vlaamse, ik ben ook Vlaams... Ze zullen hem ni te-emmen...
« Last Edit: 11 May 2004, 22:20:19 by Blanco »
Search or search or search before you ask.

Skanderborgvej

  • Guest
Re:Follow it
« Reply #2 on: 12 May 2004, 12:59:08 »
Hey thanks a lot!!!  :-*

Jaja ze zullen hem idd nooit temmen....  ;D

GRTZ