Home   Help Search Login Register  

Author Topic: AI and flares  (Read 1946 times)

0 Members and 1 Guest are viewing this topic.

RedHavoc

  • Guest
AI and flares
« on: 19 Dec 2004, 15:00:57 »
How can I get the AI to shoot flares? ???

bored_onion

  • Guest
Re:AI and flares
« Reply #1 on: 19 Dec 2004, 15:28:15 »
From the online comref:

Fire Command

unit fire weaponName

Operand types:
unit: Object
weaponName: String
Type of returned value:
Nothing
Description:
Unit will fire from given weapon.

Example:
soldierOne fire "HandGrenade"


You therefore need to write
Code: [Select]
soldierone fire ["m203","flare"]Assuming its a Western geezer
I think :-\
« Last Edit: 19 Dec 2004, 15:29:31 by bored_onion »

AK-Chester

  • Guest
Re:AI and flares
« Reply #2 on: 19 Dec 2004, 15:43:01 »
Code: [Select]
unitName fire ["m203muzzle", "flare"] 8)

bored_onion

  • Guest
Re:AI and flares
« Reply #3 on: 19 Dec 2004, 16:01:09 »
yeah that too :P

RedHavoc

  • Guest
Re:AI and flares
« Reply #4 on: 19 Dec 2004, 16:12:25 »
Same for east?

AK-Chester

  • Guest
Re:AI and flares
« Reply #5 on: 19 Dec 2004, 17:22:02 »
Nope, for east it's:

Code: [Select]
unitName fire ["grenadesmuzzle", "flare"]
« Last Edit: 19 Dec 2004, 17:22:17 by AK-Chester »

Shove It

  • Guest
Re:AI and flares
« Reply #6 on: 20 Dec 2004, 08:31:42 »
You don't need to include "muzzle". Just type:

unitname fire "flare"

Oh, by the way, try adding different colours, it can look really cool, you can use it for different signals during battle, like flarered or flaregreen. There are more, but I can't remember them.

Sophion

  • Guest
Re:AI and flares
« Reply #7 on: 20 Dec 2004, 15:14:38 »
...flareyellow, and i'm not sure but there's a flareblue (goes with lighting)

you'll have to add them to the unit before they can shoot it though, its under addmagazine (obviously)

AK-Chester

  • Guest
Re:AI and flares
« Reply #8 on: 20 Dec 2004, 16:08:19 »
You don't need to include "muzzle". Just type:

unitname fire "flare"
I just tried that (with both east and west officers, night equipment). It didn't work at all.
« Last Edit: 20 Dec 2004, 16:08:33 by AK-Chester »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:AI and flares
« Reply #9 on: 20 Dec 2004, 16:41:41 »
unitname fire "flare"

 does work.     Preview the mission as the unit in question and make sure you can fire a flare.     Check that you are spellling the name the same way everywhere and so on.

Plenty of reviewed ArmA missions for you to play

Offline 456820

  • Contributing Member
  • **
Re:AI and flares
« Reply #10 on: 20 Dec 2004, 18:26:08 »
how do you get them to fire a grenade or flare at a certain object like a marker or game logic

Sophion

  • Guest
Re:AI and flares
« Reply #11 on: 20 Dec 2004, 19:06:59 »
I'm not sure it will try to hit a marker or game logic, but it will hit something like an empty object.

This DoTarget Obj; This Fire ["m203Muzzle";"Grenade"]

i hope it works like that, i don't have my comp. It's just an educated guess.  ;)

AK-Chester

  • Guest
Re:AI and flares
« Reply #12 on: 20 Dec 2004, 20:01:24 »
unitname fire "flare"

 does work.     Preview the mission as the unit in question and make sure you can fire a flare.     Check that you are spellling the name the same way everywhere and so on.
Erm... the questions was...
How can I get the AI to shoot flares? ???
...and not "How do I get the player to shoot flares?"

But anyway, whatever I try...
Code: [Select]
unitname fire "flare"...doesn't seem to do nothing at all here, no matter if I try that with an AI or the player unit, and no matter if it's in the mission or in the intro. I just checked it, over and over and again.

Both array versions for east and west work fine here though, just like they always did. Well, at least for AI units.

RedHouse

  • Guest
Re:AI and flares
« Reply #13 on: 20 Dec 2004, 20:06:03 »
look at this script i wrote its got all the different soldiers fireing different flares just take the parts out you need

http://www.ofpec.com/editors/resource_view.php?id=733

AK-Chester

  • Guest
Re:AI and flares
« Reply #14 on: 20 Dec 2004, 20:44:50 »
Nice, RedHouse.
 :)
I tend to camCreate flares if I find they're 'important' in a mission, like...
Code: [Select]
Flare = "Flare" camCreate [getPos unitName select 0, getPos unitName select 1, 130]...I just don't trust those crazy AIs... they might have already died... run away... etc. Be aware that, if you create them below 130m, those flares might become deadly... For example, try this...
Code: [Select]
Flare = "Flare" camCreate [getPos player select 0, getPos player select 1, 120]...and don't move.
 :D

RedHouse

  • Guest
Re:AI and flares
« Reply #15 on: 21 Dec 2004, 06:29:43 »
ok ill try it later