Home   Help Search Login Register  

Author Topic: Unit Field of View / Distance of Shotting  (Read 560 times)

0 Members and 2 Guests are viewing this topic.

Offline OFPWiZard

  • Members
  • *
Unit Field of View / Distance of Shotting
« on: 31 Jan 2005, 23:17:47 »
Alright this is a question that i would like to know sometime.
This would also help me with my campaign.

*Obj:  I need to have the ai sniper snipe someone(+) from a far range.

Is that possible.

I tryed putting:
snip setViewDistance 2000

But the ai sniper still doesn't go to the target.
Well in certain positions, but when the scope is on the enemy's head.
He doesn't shot.



Quote
 
********************
MAP Nogova:

He shots when he is:
Enemy
Bh:64 =
[2176,4608,0]
[2304,4480,0]
------------------
              2240

Sniper
Bh:65 =
[2176,4480,0]
[2304,4352,0]
------------------
              2240

He doesn't shot when he is:
Enemy (mid point)
Bh:64 =
[2176,4608,0]
[2304,4480,0]
------------------
              2240

Sniper (mid point)
Bf:65 =
[1920,4480,0]
[2048,4352,0]
------------------
              1984

********************

There are three enemies in the test mission.
There names range from c1 - c3.
The sniper has a name of snip.
There is a Game Logic know as gL1.  (For camera lead-off)
The camera starts and views all the men.
Moves to view the sun . . .
-whiteout-
setAccTime .1
Views the sniper (Right side of face) *.1 second*
-blackout-
Views the sniper (Left side of face) *.1 second*
-blackout-
Views the sniper (Front side of face) *.1 second*
-blackout-

 // There is also a configed bullet-script within this too.

Camera creates the view through the sniper scope, like your guys helped me with finding. **Thanks**
Sniper targets one person.
Then switches to the last person in line.  (They're walking)
Targets c3.
Shots c3.
Then c2
Then c1.
-blackout-

This is some of the code within the attack:



Quote
snip setUnitPos "Down"
removeAllWeapons snip
snip addWeapon "HuntingRifle";
snip addMagazine "HuntingRifleMag";
snip addMagazine "HuntingRifleMag";
snip addMagazine "HuntingRifleMag";

_cam = "camera" camcreate getpos t1
_cam cameraeffect ["INTERNAL", "Back"]
_cam camsettarget snip
_cam camsetrelpos[0,40,20]
_cam camcommit 6
@camCommitted _cam
_cam camsettarget snip
_cam camsetrelpos[0,2,.5]
_cam camcommit 4
@camCommitted _cam

~1
titlecut["","BLACK OUT",2]
~1
snip dotarget c1
_cam cameraeffect ["TERMINATE", "Back"]
snip switchcamera "INTERNAL"
snip switchcamera "GUNNER"
titlecut["","BLACK IN",1]

~1.5
snip dotarget c3
~2
snip dofire c3
@ not alive c3
~0.6

_cam = "camera" camcreate getpos gL1
_cam cameraeffect ["INTERNAL", "Front"]
_cam camsettarget c2
_cam camsetrelpos[0,10,20]
_cam camcommit 1
@camCommitted _cam

c2 switchMove "FXdismay"
c2 dotarget snip
~2
c2 dowatch snip
c2 playMove "FXShow3"
snip dotarget c2

_cam camsettarget c2
_cam camsetrelpos[0,10,.5]
_cam camcommit 4
@camCommitted _cam
~1
titlecut["","BLACK OUT",2]
~1
_cam cameraeffect ["TERMINATE", "Back"]
snip switchcamera "INTERNAL"
snip switchcamera "GUNNER"
titlecut["","BLACK IN",1]

~1.5
snip dofire c2
@ not alive c2
~0.2
snip dotarget c1
~3
snip dofire c1
@ not alive c1
~5

exit

If you guys know what i mean... i would like to know how to increase there range of fire.

If that is not possible... i might need to have some other sniper snipe the dude closer and make it look like the far away one did it.

Is there a command so they could just fire?

unitname fire "HuntingRifle" ???
« Last Edit: 31 Jan 2005, 23:22:24 by OFPWiZard »

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Unit Field of View / Distance of Shotting
« Reply #1 on: 31 Jan 2005, 23:31:24 »
an alternative would be to 'cheat' and simply create the sound of a gunshot once the targets are within the scope (perhaps by having a second sniper behind the first, shooting at some other target), and then setdamage of the targets to 1.

and it's 'shoot' btw :P
« Last Edit: 31 Jan 2005, 23:32:52 by bedges »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Unit Field of View / Distance of Shotting
« Reply #2 on: 01 Feb 2005, 00:54:16 »
setViewDistance affects everybody, including the player, equally.   It doesn't apply to individual units.

Try adding a reveal command to the sequence

reveal
doTarget
doFire

Might help.    But bedges is probably right, since its for a cutscene it be easier just to fake it.     Maybe have a second, hidden sniper close to the target.    Remember that the time of flight of the bullet is about 2 seconds from 1000m.

I have personal experience of being shot by a sniper from over 1km, but that is exceptional.    I doubt they ever do it much further than that.     At 700m it takes them while to spot you and a typically a few shots to hit you, but they are a real threat.
« Last Edit: 01 Feb 2005, 00:57:18 by macguba »
Plenty of reviewed ArmA missions for you to play

Offline OFPWiZard

  • Members
  • *
Re:Unit Field of View / Distance of Shotting
« Reply #3 on: 01 Feb 2005, 02:00:24 »
ya that's what i said...

Quote
If that is not possible... i might need to have some other sniper snipe the dude closer and make it look like the far away one did it.

Is there a command so they could just fire?

but i was just checking if there was a way...

thanks bedges and macguba  8) 8) ;D