Home   Help Search Login Register  

Author Topic: Getting an AI soldier to throw a smoke shell  (Read 1104 times)

0 Members and 1 Guest are viewing this topic.

Offline Calamity

  • Former Staff
  • ****
  • Calamity Strikes AGAIN!
    • DataCraft Enterprises
Getting an AI soldier to throw a smoke shell
« on: 24 Nov 2002, 03:04:10 »
How can I get an AI soldier to throw a smoke shell and mark an LZ?

Specnaz

  • Guest
Re:Getting an AI soldier to throw a smoke shell
« Reply #1 on: 24 Nov 2002, 15:16:30 »
first add smoke shell to soldier
in init.: aP add magazine "smokeshell"
than in the waypoint where you want to throw it
in the on activ fileld: aP fire ["Throw", "smokeshell"]
that should do the trick  :cheers:

Offline @cero

  • Members
  • *
  • Yeah! Get some!!
Re:Getting an AI soldier to throw a smoke shell
« Reply #2 on: 24 Nov 2002, 18:05:09 »
I got a question, I never came across something you just sed and I'm curious, is "aP" the unit name or like the "this" from the units init field?
 I was just wondering if aP is just what you decided to call the unit as an example, or I been missing something all along ;D
Thanks
 @CERO
SCREWBY!!!

Offline XCess

  • Former Staff
  • ****
Re:Getting an AI soldier to throw a smoke shell
« Reply #3 on: 24 Nov 2002, 18:25:18 »
aP is just the name people use for tutorials with one person, I guess it's short for 'a person'.

Specnaz

  • Guest
Re:Getting an AI soldier to throw a smoke shell
« Reply #4 on: 24 Nov 2002, 18:33:50 »
or AI player :)) , i think it's same if you write "this" or "aP" or any other name of unit than aP

Offline Calamity

  • Former Staff
  • ****
  • Calamity Strikes AGAIN!
    • DataCraft Enterprises
Re:Getting an AI soldier to throw a smoke shell
« Reply #5 on: 25 Nov 2002, 22:03:45 »
I apologise for not being more specific in my original post. Here's the nitty gritty.

I have a civilian AI unit. Name = DOWNMAN
I found that I have to define a smoke shell weapon in order for the unit to use the shell.
In the INIT field I have: THIS ADDWEAPON "SMOKESHELLRED"; THIS ADDMAGAZINE "SMOKESHELLRED"; THIS ADDMAGAZINE "SMOKESHELLRED"

I then have a trigger setup. Trigger activation is on RADIO ALPHA and is set to activat repeatidly. (this way I can tell the ground unit to pop anonther smoke if I didn't find the first one)
On Activation Field contaions: HINT "HOTEL, GOLF, POP SMOKE!"; DOWNMAN FIRE ["THROW", "SMOKESHELLRED"]
The 'HINT' was a tattle tale so I knew the trigger fired. However, I still can not get the AI unit to throw the smoke shell!

micropilot

  • Guest
Re:Getting an AI soldier to throw a smoke shell
« Reply #6 on: 26 Nov 2002, 00:11:11 »
I apologise for not being more specific in my original post. Here's the nitty gritty.

I have a civilian AI unit. Name = DOWNMAN
I found that I have to define a smoke shell weapon in order for the unit to use the shell.
In the INIT field I have: THIS ADDWEAPON "SMOKESHELLRED"; THIS ADDMAGAZINE "SMOKESHELLRED"; THIS ADDMAGAZINE "SMOKESHELLRED"

I then have a trigger setup. Trigger activation is on RADIO ALPHA and is set to activat repeatidly. (this way I can tell the ground unit to pop anonther smoke if I didn't find the first one)
On Activation Field contaions: HINT "HOTEL, GOLF, POP SMOKE!"; DOWNMAN FIRE ["THROW", "SMOKESHELLRED"]
The 'HINT' was a tattle tale so I knew the trigger fired. However, I still can not get the AI unit to throw the smoke shell!

I just set this up as you described and it worked GREAT.

Offline Calamity

  • Former Staff
  • ****
  • Calamity Strikes AGAIN!
    • DataCraft Enterprises
Re:Getting an AI soldier to throw a smoke shell
« Reply #7 on: 26 Nov 2002, 00:23:43 »
Time for me to get better glasses! I Fat Fingere the keyboard and misspelled my own variable... DOWNMZN. Aragghhhh! But the "THORW" did help, I didn't have that part when I started the thred.

As for the Ap. It is a name variable assigned to the unit in the name field. Just like I called my unit DOWNMAN. The AP convention comes from the original tutorial that shipped with OFP. Every one has been propigating it since.

Any way, Thanks allot for the help guys!

Calamity Strikes Again!

Offline Calamity

  • Former Staff
  • ****
  • Calamity Strikes AGAIN!
    • DataCraft Enterprises
Re:Getting an AI soldier to throw a smoke shell
« Reply #8 on: 26 Nov 2002, 04:13:46 »
This is an FYI for anyone following this thred. I found out that if you want an AI SOLDIER to throw a smoke shell, not a civilian as I originally configured, then the smoke shell "weapon" has to be defined first. Therefore you would have to remove all weapons, add the smoke shells, then add any other weapons the soldier would need. And example of an init field for the unit would be like:
REMOVEALLWEAPONS THIS; THIS ADDMAGAZINE "SMOKESHELLGREEN"; THIS ADDMAGAZINE "SMOKESHELLGREEN"; THIS ADDWEAPON "SMOKESHELLGREEN" THIS ADDMAGAZINE "M16"; THIS ADDMAGAZINE "M16"; THIS ADDWEAPON "M16"

P.S. if any one has a better way to add magazines instesd of defining each one individually, I am definately interested! THIS ADDMAGAZINE ["M16", 5] Does not work.

Offline @cero

  • Members
  • *
  • Yeah! Get some!!
Re:Getting an AI soldier to throw a smoke shell
« Reply #9 on: 26 Nov 2002, 07:44:39 »
Isn't This AddMagazine"M16Mag"? I thought you just put M16 followed by the word mag and make sure is not on the addweapon, only M16 on the addweapon, so yes it would be like:
 Removeallweapons this; this addmagazine"M16Mag";this addweapon"M16"
 Wouldn't that give you a M16 with a mag loaded in it?
Later.
@CERO.
 Edit:  Oh yeah, just won't work like what you trying to say, puting the comand and try to give it a number or something so you don't have to right it all over again for at list 6 times, imagine if you want to change a hall squads load out... ::)
 What I do is this, I right down the Removeallweapons this, then I right down This Addmagazine"whatever", I copy the last comand by highlighting the hall comand then pres control and the leter C in the same time to copy the hall thing and then paste as many times you want by presing control and the leter V in the same time, if you got a few more units to have the same loadout just copy the hall thing from the init field of the first unit and paste it all over the init fields of the rest of your units, or just copy the unit you made first and paste as many you like to make a squad, then press F2 to go to group and linkt hem all togueder.
 I hope that helps.
Later all.
@CERO
« Last Edit: 26 Nov 2002, 07:55:11 by @cero »
SCREWBY!!!

Specnaz

  • Guest
Re:Getting an AI soldier to throw a smoke shell
« Reply #10 on: 26 Nov 2002, 12:06:36 »
did you tryed this?: aP addweaponcargo ["M16",1]; aP addmagazinecargo ["M16",5]; aP addweaponcargo ["smokeshellgreen",1];
I manage to add M16 to civilians, even to a woman, and she shoot on me because i was soviet, but i didn't try to add smokeshell to civilian, I'll try it today  ;)

Specnaz

  • Guest
Re:Getting an AI soldier to throw a smoke shell
« Reply #11 on: 26 Nov 2002, 23:49:44 »
Hey, I think that in this attachment your problem is solved.
(after 1h of work, i think my work now should be your solved problem :) )