Jump to content
Ghost Recon.net Forums

Help with a script...


Recommended Posts

Ok, well I just got back into the GR modding scene a little while ago after being away for 3 years or so. I wasn't the best before and I'm lagging pretty bad now. I'm creating a mission and I was wondering if anyone had any ideas for this.

The mission is to rescue hostages. There's 5 of them. As long as the player rescues at least one the mission will be a success. As its set up now as soon as an enemy dies a timer starts, when that timer expires a hostage is shot. I set it up so they die in order of 1-5, but if the hostage whose turn it is to die has been rescued it skips this hostage and the next timer starts. It works good how it is now, however I would like it to be a little more realistic...

1) Say its Hostage 1's turn to die but he has been rescued. I would like it to skip him and immediately kill number 2, if he to has been rescued then kill 3, so on and so forth. Once one hostage has been rescued start the timer for another death.

2) There's 2 groups of hostages, there's one dude directly guarding each group with other's patrolling the area. Could I script it so that if this one dude is dead and the guys patrolling are not aware of his death that the hostages in this group cannot be killed? But if they do notice thier dead buddy one of them (or all if necessary) will take over as the single guard on them? Or say they are in a firefight with the player, the hostage lives?

3) I have it set up now so that as soon as one enemy dies a timer starts to start killing hostages. Realistically if the player was using silenced weapons and he killed a guy without anyone noticeing and raising the alarm no one would know he was there and would have no reason to start executing. Can I script it so that once the player is seen or heard the timer starts? I believe I may know how to do this: Set up a "time elapsed", Continue If, Platoon member heard by Company. And do the same thing with Platoon member seen by company. Is this correct? I can never get it to work correctly.

Here's the part of my script as it is now:

Group: Hostage Deaths

Comment:

First Death Timer Start

Trigger Event:

A member of Enemies has been killed.

Responses:

Set First Death to expire in 120 second(s).

Group: Hostage Deaths

Comment:

Hostage 1 Saved

Trigger Event:

The escort of Hostage 1 has begun.

Responses:

Set Hostage 1 Saved to true.

Group: Hostage Deaths

Comment:

First Hostage Executed

Trigger Event:

First Death has expired.

Responses:

Set Second Death to expire in 120 second(s).

Skip the remaining responses if (The state of Hostage 1 Saved).

Have Hostage 1 commit suicide.

Display "They just killed a hostage! Hurry up!" to all players for 3 second(s).

Group: Hostage Deaths

Comment:

Hostage 2 Saved

Trigger Event:

The escort of Hostage 2 has begun.

Responses:

Set Hostage 2 Saved to true.

Group: Hostage Deaths

Comment:

Second Hostage Executed

Trigger Event:

Second Death has expired.

Responses:

Set Third Death to expire in 120 second(s).

Skip the remaining responses if (The state of Hostage 2 Saved).

Have Hostage 2 commit suicide.

Display "They just killed a hostage! Hurry up!" to all players for 3 second(s).

Group: Hostage Deaths

Comment:

Hostage 3 Saved

Trigger Event:

The escort of Hostage 3 has begun.

Responses:

Set Hostage 3 Saved to true.

Group: Hostage Deaths

Comment:

Third Hostage Exectuted

Trigger Event:

Third Death has expired.

Responses:

Set Fourth Death to expire in 120 second(s).

Skip the remaining responses if (The state of Hostage 3 Saved).

Have Hostage 3 commit suicide.

Display "They just killed a hostage! Hurry up!" to all players for 3 second(s).

Group: Hostage Deaths

Comment:

Hostage 4 Saved

Trigger Event:

The escort of Hostage 4 has begun.

Responses:

Set Hostage 4 Saved to true.

Group: Hostage Deaths

Comment:

Fourth Hostage Executed

Trigger Event:

Fourth Death has expired.

Responses:

Set Fifth Death to expire in 120 second(s).

Skip the remaining responses if (The state of Hostage 4 Saved).

Have Hostage 4 commit suicide.

Display "They just killed a hostage! Hurry up!" to all players for 3 second(s).

Group: Hostage Deaths

Comment:

Hostage 5 Saved

Trigger Event:

The escort of Hostage 5 has begun.

Responses:

Set Hostage 5 Saved to true.

Group: Hostage Deaths

Comment:

Fifth Hostage Executed

Trigger Event:

Fifth Death has expired.

Responses:

Skip the remaining responses if (The state of Hostage 5 Saved).

Have Hostage 5 commit suicide.

Group: Hostage Count

Comment:

Trigger Event:

A member of Hostages has been killed.

Responses:

Allow this block to be reactivated.

Increment Hostage Counter.

Group: Hostage Count

Comment:

Hostage Counter End

Trigger Event:

5 second(s) elapsed.

Responses:

Allow this block to be reactivated.

Continue executing responses if ((The value of Hostage Counter) is greater than or equal to 6).

Set Mission Failed to expire in 2 second(s).

Group: Mission Failure

Comment:

Mission Failed

Trigger Event:

Mission Failed has expired.

Responses:

Mark Objective 1 failed in the objective list.

Display "All the hostages are dead!" and register mission failure.

Link to post
Share on other sites

A few things for now:

1)

Set Hostage 01 Escort Flag to False

Group: Whatever

Comment:

Hostage 01 Reached

Trigger Event:

The escort of Hostage 01 has begun

Response:

Set Hostage 01 Escort to True

Hostage 01 kill timer has expired

Redirectif Hostage 01 Escort is true

Kill Hostage 01

2)

The enemy do not respond to seeing a dead body. You cannot make 1 member of a patrol do something different to the rest of the team. If they patrol walks passed the guard and should react to seeing a dead body, then you can use proximity of patrol is within 5M of guard X, continueif guard X is not active, cancel plans, give new plans. Make the patrol separate teams. Say a 2 man patrol is really 2 single men patrols.

Give them both the same path, they will seem to be in the same team. But now you can script 1 of them to change duties if needed.

3)

This is dodgy scripting I am afraid. Player being seen or heard, does necessarily mean they have been seen or heard. Is simply a line of sight within spotting distance etc. Use with caution.

Script Note:

Group: Hostage Count

Comment:

Trigger Event:

A member of Hostages has been killed.

Responses:

Allow this block to be reactivated.

Increment Hostage Counter.

Group: Hostage Count

Comment:

Hostage Counter End

Trigger Event:

5 second(s) elapsed.

Responses:

Allow this block to be reactivated.

Continue executing responses if ((The value of Hostage Counter) is greater than or equal to 6).

Set Mission Failed to expire in 2 second(s).

This could be simpler:

Group: Hostage Count

Comment:

Trigger Event:

A member of Hostages has been killed.

Responses:

Allow this block to be reactivated.

Increment Hostage Counter.

Continue executing responses if ((The value of Hostage Counter) is greater than or equal to 6).

Set Mission Failed to expire in 2 second(s).

Block remove

Will check back if I have not understood what you are after.

:thumbsup:

Link to post
Share on other sites

Ok, well I haven't had time to try this all out yet but after a quick look-through most of it seems pretty simple and straight forward. Thanks for the help. One question though:

I took a quick look in igor, and i don't completely understand the "Redirectif" response. I see how to show..."If (the state of hostage 1 saved), stop and call a queue a call to <group>. How exactly do I use this second part. I have all the Hostage Escort and Hostage Death blocks under 1 group, where exactly would I redirect to? Could you explain what this command actually does?

Once again I really appreciate the help and I apologize for my stupidity when it comes to scripting. :huh:

Link to post
Share on other sites

Once again, thanks for the help Tinker. :thumbsup: Well after a little work and alot of testing we seem to have solved my first question. I'm posting an example of my script to see what is actually necessary and what I can cut out, and also to help others out if they decide to use this same idea.

Group: <Default>

Comment:

Init

Trigger Event:

The simulation is starting.

Responses:

Set Player Platoon to (The player-controlled platoon).

Enable the Mission Failure script blocks.

Enable the Hostage Count script blocks.

Set Hostage Counter to 0.

Enable the Hostages Saved script blocks.

Enable the Hostage 2 Kill script blocks.

Enable the Hostage 3 Kill script blocks.

Enable the Hostage 4 Kill script blocks.

Enable the Hostage 5 Kill script blocks.

Group: <Default>

Comment:

Hostages

Trigger Event:

The simulation is starting.

Responses:

Hide Hostage 1 on the command map for all players.

Hide Hostage 2 on the command map for all players.

Hide Hostage 3 on the command map for all players.

Hide Hostage 4 on the command map for all players.

Hide Hostage 5 on the command map for all players.

Set all members of Hostage Team 1 to captive behavior.

Set all members of Hostage Team 2 to captive behavior.

Have Dead Hostage commit suicide.

Hide Dead Hostage on the command map for all players.

Group: <Default>

Comment:

First Death Timer Start

Trigger Event:

A member of Enemies has been killed.

Responses:

Set First Death to expire in 30 second(s).

Group: <Default>

Comment:

Hostage 1 Dead

Trigger Event:

Hostage 1 has been killed.

Responses:

Set Hostage 1 Dead to true.

Group: <Default>

Comment:

Hostage 2 Dead

Trigger Event:

Hostage 2 has been killed.

Responses:

Set Hostage 2 Dead to true.

Group: <Default>

Comment:

Hostage 3 Dead

Trigger Event:

Hostage 3 has been killed.

Responses:

Set Hostage 3 Dead to true.

Group: <Default>

Comment:

Hostage 4 Dead

Trigger Event:

Hostage 4 has been killed.

Responses:

Set Hostage 4 Dead to true.

Group: <Default>

Comment:

Hostage 5 Dead

Trigger Event:

Hostage 5 has been killed.

Responses:

Set Hostage 5 Dead to true.

Group: <Default>

Comment:

TEST TINKER

Trigger Event:

First Death has expired.

Responses:

Set Second Death to expire in 30 second(s).

Enable the Hostage 2 Kill script blocks.

If ((The state of Hostage 1 Saved) or (The state of Hostage 1 Dead)), stop and queue a call to Hostage 2 Kill.

Have Hostage 1 commit suicide.

Display "They just killed a Hostage! Hurry up!" to all players for 3 second(s).

Allow this block to be reactivated.

Group: <Default>

Comment:

TEST TINKER

Trigger Event:

Second Death has expired.

Responses:

Call Hostage 2 Kill after this block.

Group: <Default>

Comment:

TEST TINKER

Trigger Event:

Third Death has expired.

Responses:

Call Hostage 3 Kill after this block.

Group: <Default>

Comment:

TEST TINKER

Trigger Event:

Fourth Death has expired.

Responses:

Call Hostage 4 Kill after this block.

Group: <Default>

Comment:

TEST TINKER

Trigger Event:

Fifth Death has expired.

Responses:

Call Hostage 5 Kill after this block.

Group: Hostage 2 Kill

Comment:

TEST TINKER

Trigger Event:

This block has been called directly from the script.

Responses:

Set Third Death to expire in 30 second(s).

Enable the Hostage 3 Kill script blocks.

If ((The state of Hostage 2 Saved) or (The state of Hostage 2 Dead)), stop and queue a call to Hostage 3 Kill.

Have Hostage 2 commit suicide.

Display "They just killed a Hostage! Hurry up!" to all players for 3 second(s).

Allow this block to be reactivated.

Group: Hostage 3 Kill

Comment:

TEST TINKER

Trigger Event:

This block has been called directly from the script.

Responses:

Set Fourth Death to expire in 30 second(s).

Enable the Hostage 4 Kill script blocks.

If ((The state of Hostage 3 Saved) or (The state of Hostage 3 Dead)), stop and queue a call to Hostage 4 Kill.

Have Hostage 3 commit suicide.

Display "They just killed a Hostage! Hurry up!" to all players.

Allow this block to be reactivated.

Group: Hostage 4 Kill

Comment:

TEST TINKER

Trigger Event:

This block has been called directly from the script.

Responses:

Set Fifth Death to expire in 30 second(s).

Enable the Hostage 5 Kill script blocks.

If ((The state of Hostage 4 Saved) or (The state of Hostage 4 Dead)), stop and queue a call to Hostage 5 Kill.

Have Hostage 4 commit suicide.

Display "They just killed a Hostage! Hurry up!" to all players for 3 second(s).

Allow this block to be reactivated.

Group: Hostage 5 Kill

Comment:

TEST TINKER

Trigger Event:

This block has been called directly from the script.

Responses:

Have Hostage 5 commit suicide.

Display "They just killed a Hostage! Hurry up!" to all players for 3 second(s).

Group: Hostages Saved

Comment:

Hostage 1 Saved

Trigger Event:

The escort of Hostage 1 has begun.

Responses:

Set Hostage 1 Saved to true.

Group: Hostages Saved

Comment:

Hostage 2 Saved

Trigger Event:

The escort of Hostage 2 has begun.

Responses:

Set Hostage 2 Saved to true.

Group: Hostages Saved

Comment:

Hostage 3 Saved

Trigger Event:

The escort of Hostage 3 has begun.

Responses:

Set Hostage 3 Saved to true.

Group: Hostages Saved

Comment:

Hostage 4 Saved

Trigger Event:

The escort of Hostage 4 has begun.

Responses:

Set Hostage 4 Saved to true.

Group: Hostages Saved

Comment:

Hostage 5 Saved

Trigger Event:

The escort of Hostage 5 has begun.

Responses:

Set Hostage 5 Saved to true.

THANKS!

Link to post
Share on other sites

Well here's a copy of the entire script. As I said, its been years since I ever touched GR, let alone igor, so I apologize if this is just a huge gaggle######. This is the result I got after trying everything and after finally getting it to work consistently. Thanks for the help and input.

Group: <Default>

Comment:

Init

Trigger Event:

The simulation is starting.

Responses:

Set Player Platoon to (The player-controlled platoon).

Enable the Hostage Count script blocks.

Set Hostage Counter to 0.

Enable the Hostages Saved script blocks.

Enable the Hostage 2 Kill script blocks.

Enable the Hostage 3 Kill script blocks.

Enable the Hostage 4 Kill script blocks.

Enable the Hostage 5 Kill script blocks.

Set Objective Counter to 0.

Set Hostage Rescue Counter to 0.

Group: <Default>

Comment:

Insertion

Trigger Event:

The simulation is starting.

Responses:

Make Insertion Boat visible to the game world.

Place all members of Player Platoon in Insertion Boat.

Turn off platoon AI for Player Platoon.

Assign Insertion Boat Plan 1 to Insertion Boat and execute.

Group: <Default>

Comment:

00: No Replay

Trigger Event:

The simulation is starting.

Responses:

Continue executing responses if (The game mode is Single Player).

Override default replay recording start.

Group: <Default>

Comment:

01: Load Raft

Trigger Event:

The simulation is starting.

Responses:

Continue executing responses if (The game mode is Single Player).

Begin Cinematic Mode.

Make Insertion Boat visible to the game world.

Place all members of Player Platoon in Insertion Boat.

Enable the Insert A script blocks.

Turn off platoon AI for Player Platoon.

Place the camera at Camera A, facing Camera A Target 1.

Start playing "GRIT_Rapid_Python.wav".

Group: <Default>

Comment:

MUST REMOVE

Trigger Event:

The simulation is starting.

Responses:

Make all members of Player Platoon invincible.

Make all members of Player Platoon undetectable.

Group: <Default>

Comment:

Hostages

Trigger Event:

The simulation is starting.

Responses:

Hide Hostage 1 on the command map for all players.

Hide Hostage 2 on the command map for all players.

Hide Hostage 3 on the command map for all players.

Hide Hostage 4 on the command map for all players.

Hide Hostage 5 on the command map for all players.

Set all members of Hostage Team 1 to captive behavior.

Set all members of Hostage Team 2 to captive behavior.

Set all members of Hostage Team 3 to captive behavior.

Set all members of Hostage Team 4 to captive behavior.

Set all members of Hostage Team 5 to captive behavior.

Have Dead Hostage commit suicide.

Hide Dead Hostage on the command map for all players.

Group: <Default>

Comment:

Alert of Dead Hostage

Trigger Event:

A member of Player Platoon is within 5 meter(s) of Alert Hostage is Dead Zone.

Responses:

Display "Looks like they killed one hostage before we got here..." to all players for 3 second(s).

Group: <Default>

Comment:

First Death Timer Start

Trigger Event:

A member of Enemies has been killed.

Responses:

Set First Death to expire in 30 second(s).

Group: <Default>

Comment:

Objective X Fail

Trigger Event:

A member of Hostages has been killed.

Responses:

Mark Objective X failed in the objective list.

Group: <Default>

Comment:

TEST TINKER

Trigger Event:

First Death has expired.

Responses:

Set Second Death to expire in 30 second(s).

Enable the Hostage 2 Kill script blocks.

If ((The state of Hostage 1 Saved) or (The state of Hostage 1 Dead)), stop and queue a call to Hostage 2 Kill.

Have Hostage 1 commit suicide.

Display "They just killed a Hostage! Hurry up!" to all players for 3 second(s).

Allow this block to be reactivated.

Group: <Default>

Comment:

Hostage 1 Dead

Trigger Event:

Hostage 1 has been killed.

Responses:

Set Hostage 1 Dead to true.

Group: <Default>

Comment:

Hostage 2 Dead

Trigger Event:

Hostage 2 has been killed.

Responses:

Set Hostage 2 Dead to true.

Group: <Default>

Comment:

Hostage 3 Dead

Trigger Event:

Hostage 3 has been killed.

Responses:

Set Hostage 3 Dead to true.

Group: <Default>

Comment:

Hostage 4 Dead

Trigger Event:

Hostage 4 has been killed.

Responses:

Set Hostage 4 Dead to true.

Group: <Default>

Comment:

Hostage 5 Dead

Trigger Event:

Hostage 5 has been killed.

Responses:

Set Hostage 5 Dead to true.

Group: <Default>

Comment:

TEST TINKER

Trigger Event:

Second Death has expired.

Responses:

Call Hostage 2 Kill after this block.

Group: <Default>

Comment:

TEST TINKER

Trigger Event:

Third Death has expired.

Responses:

Call Hostage 3 Kill after this block.

Group: <Default>

Comment:

TEST TINKER

Trigger Event:

Fourth Death has expired.

Responses:

Call Hostage 4 Kill after this block.

Group: <Default>

Comment:

TEST TINKER

Trigger Event:

Fifth Death has expired.

Responses:

Call Hostage 5 Kill after this block.

Group: <Default>

Comment:

Objective 2 Complete

Trigger Event:

All actors in Enemies have been killed.

Responses:

Mark Objective 2 complete in the objective list.

Display "Looks like you killed them all. Grab all the hostages and get back to the insertion zone." to all players for 5 second(s).

Increment Objective Counter.

Group: <Default>

Comment:

Trigger Event:

4 second(s) elapsed.

Responses:

Allow this block to be reactivated.

Continue executing responses if ((The value of Hostage Rescue Counter) is greater than or equal to 2).

Increment Objective Counter.

Group: <Default>

Comment:

Trigger Event:

2 second(s) elapsed.

Responses:

Allow this block to be reactivated.

Continue executing responses if ((The value of Objective Counter) is greater than or equal to 2).

Mark Objective 1 complete in the objective list.<---I can probably remove this now that I fixed the problem I had before. See EDIT.

Display "Mission Complete" and register mission completion.

Group: <Default>

Comment:

Trigger Event:

A member of Hostage Team 2 is within 15 meter(s) of Insertion.

Responses:

Increment Hostage Rescue Counter.

Cancel captive behavior for all members of Hostage Team 2.

Assign Hostage Rescued Plan to Hostage Team 2 and execute.

Assign "saved_hostage.kit" to Hostage 2.

Group: <Default>

Comment:

Trigger Event:

A member of Hostage Team 3 is within 15 meter(s) of Insertion.

Responses:

Increment Hostage Rescue Counter.

Cancel captive behavior for all members of Hostage Team 3.

Assign Hostage Rescued Plan to Hostage Team 3 and execute.

Assign "saved_hostage.kit" to Hostage 3.

Group: <Default>

Comment:

Trigger Event:

A member of Hostage Team 4 is within 15 meter(s) of Insertion.

Responses:

Increment Hostage Rescue Counter.

Cancel captive behavior for all members of Hostage Team 4.

Assign Hostage Rescued Plan to Hostage Team 4 and execute.

Assign "saved_hostage.kit" to Hostage 4.

Group: <Default>

Comment:

Trigger Event:

A member of Hostage Team 5 is within 15 meter(s) of Insertion.

Responses:

Cancel captive behavior for all members of Hostage Team 5.

Increment Hostage Rescue Counter.

Assign Hostage Rescued Plan to Hostage Team 5 and execute.

Assign "saved_hostage.kit" to Hostage 5.

Group: <Default>

Comment:

Trigger Event:

A member of Hostage Team 1 is within 15 meter(s) of Insertion.

Responses:

Increment Hostage Rescue Counter.

Cancel captive behavior for all members of Hostage Team 1.

Assign Hostage Rescued Plan to Hostage Team 1 and execute.

Assign "saved_hostage.kit" to Hostage 1.

Group: Hostage 2 Kill

Comment:

TEST TINKER

Trigger Event:

This block has been called directly from the script.

Responses:

Set Third Death to expire in 30 second(s).

Enable the Hostage 3 Kill script blocks.

If ((The state of Hostage 2 Saved) or (The state of Hostage 2 Dead)), stop and queue a call to Hostage 3 Kill.

Have Hostage 2 commit suicide.

Display "They just killed a Hostage! Hurry up!" to all players for 3 second(s).

Allow this block to be reactivated.

Group: Hostage 3 Kill

Comment:

TEST TINKER

Trigger Event:

This block has been called directly from the script.

Responses:

Set Fourth Death to expire in 30 second(s).

Enable the Hostage 4 Kill script blocks.

If ((The state of Hostage 3 Saved) or (The state of Hostage 3 Dead)), stop and queue a call to Hostage 4 Kill.

Have Hostage 3 commit suicide.

Display "They just killed a hostage! Hurry up!" to all players for 3 second(s).

Allow this block to be reactivated.

Group: Hostage 4 Kill

Comment:

TEST TINKER

Trigger Event:

This block has been called directly from the script.

Responses:

Set Fifth Death to expire in 30 second(s).

Enable the Hostage 5 Kill script blocks.

If ((The state of Hostage 4 Saved) or (The state of Hostage 4 Dead)), stop and queue a call to Hostage 5 Kill.

Have Hostage 4 commit suicide.

Display "They just killed a Hostage! Hurry up!" to all players for 3 second(s).

Allow this block to be reactivated.

Group: Hostage 5 Kill

Comment:

TEST TINKER

Trigger Event:

This block has been called directly from the script.

Responses:

Skip the remaining responses if ((The state of Hostage 5 Saved) or (The state of Hostage 5 Dead)).

Have Hostage 5 commit suicide.

Display "They just killed a Hostage! Hurry up!" to all players for 3 second(s).

Group: Hostage Count

Comment:

Trigger Event:

A member of Hostages has been killed.

Responses:

Allow this block to be reactivated.

Increment Hostage Counter.

Group: Hostage Count

Comment:

Hostage Counter End

Trigger Event:

5 second(s) elapsed.

Responses:

Allow this block to be reactivated.

Continue executing responses if ((The value of Hostage Counter) is greater than or equal to 5).

Mark Objective 1 failed in the objective list.

Display "You lost too many hostages!" and register mission failure.

Group: Hostages Saved

Comment:

Hostage 1 Saved

Trigger Event:

The escort of Hostage 1 has begun.

Responses:

Set Hostage 1 Saved to true.

Group: Hostages Saved

Comment:

Hostage 2 Saved

Trigger Event:

The escort of Hostage 2 has begun.

Responses:

Set Hostage 2 Saved to true.

Group: Hostages Saved

Comment:

Hostage 3 Saved

Trigger Event:

The escort of Hostage 3 has begun.

Responses:

Set Hostage 3 Saved to true.

Group: Hostages Saved

Comment:

Hostage 4 Saved

Trigger Event:

The escort of Hostage 4 has begun.

Responses:

Set Hostage 4 Saved to true.

Group: Hostages Saved

Comment:

Hostage 5 Saved

Trigger Event:

The escort of Hostage 5 has begun.

Responses:

Set Hostage 5 Saved to true.

Group: Insert A

Comment:

01 Skip: Player Requests Skip

Trigger Event:

The player has requested to skip the current cinematic.

Responses:

Set Skip Insert to true.

Fade to black.

Group: Insert A

Comment:

02 Skip: Main Block

Trigger Event:

The display has completed a fade to black.

Responses:

Continue executing responses if (The state of Skip Insert).

Cancel execution of any plan assigned to Insertion Boat.

Unload all actors from Insertion Boat.

Teleport all members of Player Platoon to Insertion 2.

Turn on platoon AI for Player Platoon.

Return the camera to the default viewpoint.

End Cinematic Mode.

Begin recording replay now.

Teleport Insertion Boat to Boat Skip Insert Position.

Stop playing music.

Group: Insert A

Comment:

02: Camera Switch 1

Trigger Event:

Insertion Boat is within 3 meter(s) of Camera Switch 1.

Responses:

Skip the remaining responses if (The state of Skip Insert).

Place the camera at Camera A1, facing Camera A1 Target 1.

Group: Insert A

Comment:

02b: Camera Switch 2

Trigger Event:

Insertion Boat is within 3 meter(s) of Camera Switch 2.

Responses:

Skip the remaining responses if (The state of Skip Insert).

Place the camera at Camera B, facing Camera B Target 1.

Enable the Insert B script blocks.

Group: Insert B

Comment:

03: Fade Out

Trigger Event:

7 second(s) elapsed.

Responses:

Skip the remaining responses if (The state of Skip Insert).

Fade to black.

Group: Insert B

Comment:

04: End Cimematic

Trigger Event:

The display has completed a fade to black.

Responses:

Skip the remaining responses if (The state of Skip Insert).

Return the camera to the default viewpoint.

End Cinematic Mode.

Turn on platoon AI for Player Platoon.

Begin recording replay now.

Stop playing music.

:unsure:

Also, I've tried to mark the first objective (secure hostages) as complete once at least 2 hostages make it back to the insertion zone. I can do this with a "Time Elapsed" trigger, then compare integers (if Hostage Saved Counter is equal to or greater than 2), mark objective complete, and using a BlockPreserve. But with this once objective is complete it pops up every few seconds telling me so. Is there a way to mark it complete but then stop executing that block once it is?

EDIT: Wow, something must've finally clicked after I typed that last question. I'm pretty sure I solved it on my own for once. After a quick test it seems I have. Here's the new part of the script:

Group: <Default>

Comment:

Objective 1

Trigger Event:

4 second(s) elapsed.

Responses:

Allow this block to be reactivated.

Continue executing responses if ((The value of Hostage Rescue Counter) is greater than or equal to 2).

Skip the remaining responses if (The state of HostagesSaved).

Increment Objective Counter.

Mark Objective 1 complete in the objective list.

Set HostagesSaved to true.

Edited by BrandonKappel
Link to post
Share on other sites

If you allow a block to be recativated, you must add a block presereve at the end once it completes.

Group: <Default>

Comment:

Objective 1

Trigger Event:

4 second(s) elapsed.

Responses:

Allow this block to be reactivated.

Continue executing responses if ((The value of Hostage Rescue Counter) is greater than or equal to 2).

Skip the remaining responses if (The state of HostagesSaved).

Increment Objective Counter.

Mark Objective 1 complete in the objective list.

Set HostagesSaved to true.

Prevent this block from being reactivated

It will keep allowing this block to reactivate until either it has been told to skip, or it reaches the end.

I also meant to get a copy of the Igor file, can Import it, do not need mods to look at.

Link to post
Share on other sites

Wow! You never cease to amaze me Tinker. A few minor changes and it runs perfect, almost exactly how I wanted it. Maybe some day I'll be on your level of scripting. :notworthy: I'm gunna add a few more things to mix it up a little, I'll let you know how it comes out. Too bad though, if I ever do release this in a campaign I can't accept credit for this...its all Tinker. :thumbsup:

Edited by BrandonKappel
Link to post
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...