Home   Help Search Login Register  

Author Topic: Laying position for gun  (Read 726 times)

0 Members and 1 Guest are viewing this topic.

jaksa

  • Guest
Laying position for gun
« on: 01 Oct 2005, 10:21:49 »
Hi lads
Is it possible to force You or AI to do this:
if soldier get in hands specific weapon, imediately go prone, and use it only in lying position?
I was asking similar thread some time ago, but...
I would like to make a light portable mortar, usable for AI, as a main weapon, and one can't fire mortar, while running :)

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Laying position for gun
« Reply #1 on: 01 Oct 2005, 11:05:24 »
I know of no way to detect which weapon a guy has active - and I have tried hard to find out.  If you are okay with him going prone as soon as he picks up the weapon then try something like:

Trigger condition
"M16" in weapons unitname

Trigger Activation
unitname setUnitPos "Down"

« Last Edit: 01 Oct 2005, 11:09:07 by THobson »

jaksa

  • Guest
Re:Laying position for gun
« Reply #2 on: 02 Oct 2005, 16:22:05 »
The idea is to create portable mortar - very useful and powerful support weapon on platoon level (platoon artilery :) ). I thing, it schould be operated by AI, so player could play more "spectacular" role. In a defence is no problem - static object. But in attack, must be easily movable. As i know, there is 3 ways:

Made in rpg class, and
1. Change the anim for rpg with the special one for mortar. The best effect, but incompatybile with any rpg any more :( Acceptable for early ww2 times, but this weapon is used in present as well.
2. Leave the rpg anim. Effect will be awefull (wepon on a ground, and hands up), but it will work properly (i hope so) and with all stuff. Maybe in OFP 2...

And 3rd:
Create/delete object- in my opinion not good way.

What do you think about it? Do we need such addon, or no? If yes, how to do it?
« Last Edit: 02 Oct 2005, 16:23:22 by jaksa »

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:Laying position for gun
« Reply #3 on: 02 Oct 2005, 20:29:59 »
Well, if the loon who's carrying the mortar has only the mortar in his weaponry, then you could use a simple script to detect what you're looking for:

Code: [Select]
goto "Init"

#Loop
? (_man hasWeapon "My_Mortar") && (speed _man > 1): goto "SwitchPos"
~1
goto "Loop"

#SwitchPos
_man switchMove "NameOfLayingDownAnim"
_man setUnitPos "DOWN"
_man doStop true
goto "Loop"

#Init
_man = _this select 0
goto "Loop"
Or something like that. :P
« Last Edit: 02 Oct 2005, 20:30:17 by Tyger »
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

jaksa

  • Guest
Re:Laying position for gun
« Reply #4 on: 03 Oct 2005, 21:49:19 »
Thanks a lot!
I'll try it in next few days.
One more question: Can AI open fire, when behaviour is set on "careless" (or whatever) or engine has change it to "combat" before? How to detect what behaviour is set up?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Laying position for gun
« Reply #5 on: 03 Oct 2005, 23:25:03 »
behaviour unit

Operand types:
unit: Object
Type of returned value:
String
Description:
Behaviour mode of given unit ("CARELESS","SAFE","AWARE","COMBAT","STEALTH")

Example:
behaviour player
Plenty of reviewed ArmA missions for you to play