OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: x_lim1t on 24 Jan 2003, 03:11:45

Title: I need help tweaking
Post by: x_lim1t on 24 Jan 2003, 03:11:45
Im using 1.46 XP(no money for OFPR)

for SEFE'z SpySatelite script, i want to make the satelite follow a certain object. how do i do that.

the original parameter for executing the script is
["SHOW", Coordinates] Exec "SpySat.sqs"

i tried using the "GetPos" command but it wont follow the object  
["SHOW", Getpos s1] Exec "SpySat.sqs"

here is the code, can anyone help me? thx alot

Code: [Select]
; Spy satellite script
; by SEFE

_Action = _this Select 0

Goto _Action

Exit

#SHOW

_Position = _this Select 1

SatelliteZoom = 1

ShowCinemaBorder FALSE

Satellite = "Camera" CamCreate [_Position Select 0, (_Position Select 1) - 10, 400]
_Target = "Logic" Camcreate [_Position Select 0, _Position Select 1, 0]

Satellite CameraEffect ["INTERNAL", "BACK"]
Satellite CamSetTarget _Target
Satellite CamSetFOV 2

Satellite CamCommit 0

Exit

#TERMINATE

Satellite CameraEffect ["TERMINATE", "BACK"]
CamDestroy Satellite

ShowCinemaBorder TRUE

Exit

#ZOOMIN


@CamCommitted Satellite
SatelliteZoom = SatelliteZoom + 1
? SatelliteZoom > 5 : SatelliteZoom = 5
Satellite CamSetFOV 2/SatelliteZoom^2
Satellite CamCommit 1
@CamCommitted Satellite

Exit

#ZOOMOUT

@CamCommitted Satellite
SatelliteZoom = SatelliteZoom - 1
? SatelliteZoom < 1 : SatelliteZoom = 1
Satellite CamSetFOV 2/SatelliteZoom^2
Satellite CamCommit 1
@CamCommitted Satellite

Exit