Jump to content
Ghost Recon.net Forums

Player death and objectives


Recommended Posts

I was wondering if there was a way of stopping a counter if a particular player dies in co-op mode.

The situation is this, I have a scenario where a player must plant a demo charge (This will change to him planting a hacking device soon, but the result is the same script wise) at a computer to simulate hacking data from it. This activates a timer that counts down 20 seconds then the objective is declared complete.

Once he places the demo charge it also activates a reinforcement squad who teleports into the area and displays a message to the player team to cover him.

My question is this, if he dies the counter continues and the objective still completes. Is there a way of stopping and resetting this counter if HE dies, not worried about the other player characters, just the one who placed the demo charge. If there are no other demo equiped guys on the team then the mission fails due to not enough demo charges left which is fine, but if there are any left I want them to then have to start the hack again themselves.

Link to post
Share on other sites

Yeah 'tis easy enough. If you have my mod 'Band of Brothers' (if you haven't why not! :nono: - lol), check the last mission. There are two script areas which may help you. One is downloading the data from the computer and the other is defusing the bombs. In both cases the player must stay within a small range while the operation is occurring. If he moves away it will stop and be reset. So he can move away and back again and it will restart.

Cheers, Jack :rocky:

Link to post
Share on other sites

Thanks Jack57, I do have the mod and it rocks, now i understand a bit more about IGOR i will check those scripts out when i get home. I must admit I looked at various peoples scripts when I first started learning and they confused me more than helped, hopefully now I can make sense of them.

I take it they use the zone as the trigger rather than the planting of a demo charge then. If this is the case does that mean any player can activate it cos I want it to be only players carrying the Hacking device (read demo charges)?

Link to post
Share on other sites

I know I am not a master in IGOR but why not use an actors death with a get nearest player (to a certain zone) which should be the closest player controlled actor. Make the range 1 meter. I am sorry for the answer to be a little simple but I am at work so cant take a look at IGOR.

BTW can the range also be 0.5 meter? Or won't that work?

Edited by el nino foxhound
Link to post
Share on other sites
I take it they use the zone as the trigger rather than the planting of a demo charge then. If this is the case does that mean any player can activate it cos I want it to be only players carrying the Hacking device (read demo charges)?

Yeah that might get a bit trickier. You could have it so when a demo charge is placed you, 1.) activate the script (GroupEnable) and 2.) Assign a Variable actor reference to the actor nearest the object you used for reference for the DemoChargePlaced trigger. This way if he leaves or is killed you can stop the script (GroupDisable). A potential problem may be if that if there is another actor that is closer to the object you used for reference for the DemoChargePlaced trigger, it will assign the reference to the wrong actor. You could use an Effect for the proximity reference and make the range quite small, say 2 metres. You would of course then need to stress in the briefing that the demo charge must be placed precisely.

Link to post
Share on other sites

To save you the troulble digging for it here is the script I used in that mission. I have modified it to reflect your needs. Bear in mind that I haven't tested it in this form but I'm fairly confident it would work. If you wish, you could still use GroupEnable\Disable as I mentioned above.

Group: <Default>

Comment:

   Demo Charge placed

Trigger Event:

   A demo charge was placed within 2 meter(s) of EffectHacking.

Responses:

   Allow this block to be reactivated.

   Set DemoMan to (The actor nearest EffectHacking).

_____________________________________________________

Group: <Default>

Comment:

   Hacking Computer

Trigger Event:

   DemoMan is within 2 meter(s) of EffectHacking.

Responses:

   Allow this block to be reactivated.

   Continue executing responses if (DemoMan is active).

   Decrement HackingCounter.

   Display ("Accessing computer files.  Standby -   " + ((The value of HackingCounter) as text)) to all players for 1.25 second(s).

   Continue executing responses if ((The value of HackingCounter) is less than 1).

   Play "I_UI6.wav" at volume 0.8.

   Prevent this block from being reactivated.

   Display "Accessing computer files.  Standby -  Files transferred!" to all players for 3 second(s).

  Set HackingObjectiveComplete timer to expire in 5 secs.

   Set HackingCounter to 11. (if you want to use it again elsewhere)

____________________________________________________

Group: <Default>

Comment:

   Reset HackingCounter (skip this block if you want the hacking to pick up where it left off)

Trigger Event:

   1 second(s) elapsed.

Responses:

   Allow this block to be reactivated.

   Continue executing responses if ((((The distance between DemoMan and EffectHacking) truncated to an integer) is greater than 2) or (The inverse of (DemoMan is active))).

   Set HackingCounter to 11.

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...