Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
p75

Switch to locked target - external view - opposite side through action button

Recommended Posts

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!

Edited by p75

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites

I made a sample script of the camera. The camera moves with the left mouse drug around the target unit.

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.

Edited by Gigan

Share this post


Link to post
Share on other sites

Hey mate,

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

Edited by p75

Share this post


Link to post
Share on other sites
Sign in to follow this  

×