Home   Help Search Login Register  

Author Topic: Are we allowed to post here yet?/Check hold fire  (Read 1564 times)

0 Members and 1 Guest are viewing this topic.

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Are we allowed to post here yet?/Check hold fire
« on: 29 Apr 2006, 09:38:20 »
Are we allowed to ask questions again?

If so I'd like to know how to check if a unit (AI) has been told to hold fire.
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Are we allowed to post here yet?/Check hold fire
« Reply #1 on: 29 Apr 2006, 09:57:19 »
dunno, really. the boards aren't public yet so we won't really be answering questions until they are.

however, i believe the answer is

Code: [Select]
combatMode unit_name
which will return "BLUE" (Never fire), "GREEN" (Hold fire - defend only), "WHITE" (Hold fire, engage at will), "YELLOW" (Fire at will), or "RED" (Fire at will, engage at will).

dunno if that works with explicit "hold fire" instructions, but a quick experiment will tell you.

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re: Are we allowed to post here yet?/Check hold fire
« Reply #2 on: 29 Apr 2006, 16:33:43 »
The command you can give to your squad as the leader results in the same as
unit setcombatmode "blue"
Not all is lost.

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re: Are we allowed to post here yet?/Check hold fire
« Reply #3 on: 30 Apr 2006, 01:13:46 »
I have this guy, a member of my squad. When my squad identifies all of an enemy AI squad he fires a flare.
Only trouble is that with the script I'm running, he fires even when he's told to hold fire. I want to add a bit into the script that detects whether or not he's been told to hold fire, and if he has, to loop until otherwise.
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re: Are we allowed to post here yet?/Check hold fire
« Reply #4 on: 30 Apr 2006, 04:04:01 »
so....

Code: [Select]
.... other code here...
if !(combatMode _unit == "RED") then {goto "WaitLoop"}

.... more code....

#WaitLoop
~1
if (combatMode _unit == "RED") then {goto "MainLoop"}
goto "WaitLoop"

.... code here...
"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

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re: Are we allowed to post here yet?/Check hold fire
« Reply #5 on: 30 Apr 2006, 23:29:53 »
He still fires the flare. He's retarded.  :-[
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Are we allowed to post here yet?/Check hold fire
« Reply #6 on: 01 May 2006, 00:05:52 »
my only other suggestion would be a workaround whereby you set up a loop which checks if the loon's combatmode is white, green or blue, and if so remove flares. then jump to another loop which waits until the loon's combatmode is yellow or red and give them back for him to play with, so long as he promises to tidy them up when he's finished. then jump back to the first loop.
« Last Edit: 01 May 2006, 00:11:29 by bedges »