PDA

View Full Version : Switch to locked target - external view - opposite side through action button



p75
Aug 8 2009, 11:15
Hi Lads,

I was wondering if one of you scripting gururs can help me out with this. If I want to add an action which would allow to switch from current position (say blue) to locked target view (say red). Preferably 3rd person view, allowing to turn around the object in freelock mode. First person view would be a bonus.

Appreciating all the help I can get with this!

Thanks!

Gigan
Aug 8 2009, 15:00
Hi,
If it can be judged whether the player locked the enemy unit, it might be possible.

1.The camera is generated, and the target unit is projected.
2.A transparent dialog is displayed and the mouse event handler is set.
3.The camera is made to move in times of surroundings centering on the target according to mouse's movement.
4.Addaction is done to the player by the above-mentioned processing.

p75
Aug 8 2009, 15:54
Hi,
If it can be judged whether the player locked the enemy unit, it might be possible.

1.The camera is generated, and the target unit is projected.
2.A transparent dialog is displayed and the mouse event handler is set.
3.The camera is made to move in times of surroundings centering on the target according to mouse's movement.
4.Addaction is done to the player by the above-mentioned processing.

Hi mate, I would presume the data "locked player" is somewhere stored in the memory (its coordinates) as a variable, how else could a fired missle find the coordinates of the locked target. I'm kind of new to the scripting part, but I'd would like to see this as it will add alot for training purposes in the single player mode. Do you have some pointers how I can find out/where do I need to look if it is possible? Which PBOs? Thanks!

Gigan
Aug 9 2009, 01:28
I made a sample script of the camera. The camera moves with the left mouse drug around the target unit.
camsurr.utes.zip (http://giganarma.googlepages.com/camsurr.utes.zip)

The camera starts specifying the target unit.
_handle = [ targetUnit ] execVM "cam.sqf"

When the player locks the object, this camera is execute by the action added by addaction. It remains, If this processing can be achieved, it demands and the way is achieved.

p75
Aug 9 2009, 06:27
Hey mate,

Great work!!! I've send you a pm with some questions.