Jump to content

Randomized Killhouse


Jack Wachter

Recommended Posts

So I've started messing around with IGOR and well, I'm slowly figuring things out. Right now I've figured out how to setup the enemies: basically moving all the points to inside the building(s) of interest and use the SpawnOpposingPatrolForce response with a random number of enemies. It's quite refreshing.

I'm having issues figuring out how to spawn in noncombatants in a randomized way. I know the settings I need to use to make them noncombatants, but how can I reliably set it up to be randomized?

Link to comment
Share on other sites

I found a way to do it. I'm using SpawnOpposingPatrolForce for both the noncombatants and OPFOR. The sequence goes like this:

  1. SpawnOpposingPatrolForce
  2. Set the first active company to be called "Noncombatants"
  3. Make all actors in Noncombatants undetectable
  4. Queue a loop for all actors in Noncombatants that leads to a block that gives them all some form of kit with no weapons (I decided to set them up with cameras among other things)
  5. SpawnOpposingPatrolForce <-this spawns another enemy patrol force, but these guys keep their weapons and act as normal.

EDIT: Here is my current template script. I'm using separate constants for some of the numbers so that I don't have to open a million windows to adjust one value.

Spoiler

Group: <Default>
Comment:
   Spawn Noncombatants then OPFOR
Trigger Event:
   The simulation is initializing.
Responses:
   Spawn an opposing patrol force with (A random integer between 1 and 30) members.
   Set Company - Noncombatants to (The first active company).
   Make all actors in Company - Noncombatants undetectable.
   Use Group - Noncombatants to loop over all actors in Company - Noncombatants after this block.
   Set Counter - Noncombatant Deaths to 0.
   Spawn an opposing patrol force with (A random integer between 1 and 50) members.

Group: <Default>
Comment:
   End the mission
Trigger Event:
   All actors in Company - OPFOR have been killed.
Responses:
   Mark Objective - OPFOR Elimination complete in the objective list.
   Display ("Noncombatant Deaths: " + ((The value of Counter - Noncombatant Deaths) as text)) to all players for 5 second(s).
   Display "Area cleared of all hostiles" and register mission completion.

Group: <Default>
Comment:
   Noncombatant death notification
Trigger Event:
   A member of Company - Noncombatants has been killed.
Responses:
   Allow this block to be reactivated.
   Increment Counter - Noncombatant Deaths.
   Display ("Noncombatant Deaths: " + ((The value of Counter - Noncombatant Deaths) as text)) to all players.

Group: Group - Noncombatants
Comment:
   Give noncombatants no weapon kits
Trigger Event:
   An actor loop is ready to process Actor - Loop.
Responses:
   Allow this block to be reactivated.
   Assign ("noncombatant_" + (((A random integer between 1 and 41) as text) + ".kit")) to Actor - Loop.
   Force Actor - Loop to flee.

 

Edited by Jack Wachter
  • Like 2
Link to comment
Share on other sites

On 11/12/2019 at 04:44, Jack Wachter said:

It works except for automatically ending the mission when all of the actual enemies are dead. It's still functional, just requires manually exiting the mission and no notification when all enemies are dead.

that can be solved by multiple ways , either create timer and call trigger timer expired(one sec, check if all members of OPFOR company is killed or  is 0 members is in OPFOR alive then end objective, or/and endGame) or chose trigger DeathCompany then close objective/EndGame.

Edited by die7
Link to comment
Share on other sites

8 hours ago, die7 said:

the first script is ok, it's a typical firefight with 50 enemies and it works, the second one can not work, afaik just one opfor company can be spawned and existing, the second is automatically player company

It works actually, the only issue I have is attaching a CompanyRef to the second use of it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...