Home   Help Search Login Register  

Author Topic: Misson Win On Killing A Civilian  (Read 1970 times)

0 Members and 1 Guest are viewing this topic.

Offline Semedar

  • Members
  • *
    • Semedars Official Website
Misson Win On Killing A Civilian
« on: 28 Dec 2009, 22:29:27 »
Can anyone help me out how to script my mission so when you kill a civilian (Just one) you complete the mission and it ends?

And if possible, how to make it when you kill the civilian a sound plays then the mission ends.

Anyways thanks for reading  :)

My mission:

Kill the civilian thats surrounded by bunch of OPFOR in a heavily wooded area to complete the mission.
« Last Edit: 29 Dec 2009, 00:25:09 by Semedar »

Offline Krieg

  • Mission Maker
  • Members
  • *
  • Who dares wins.
Re: Misson Win On Killing A Civilian
« Reply #1 on: 29 Dec 2009, 13:24:14 »
Does civilian have to move around?

If not, it is this simple:
Quote
Put a trigger in are the civilian would be present, size whatever you want, activated by civilian, once not present.
In type of the trigger select "End 1", and put whatever time delay you want.

And also,  :welcome: to OFPEC!
If you see a light at the end of the tunnel, then it's probably an enemy tank.

Offline Semedar

  • Members
  • *
    • Semedars Official Website
Re: Misson Win On Killing A Civilian
« Reply #2 on: 29 Dec 2009, 21:17:43 »
Hah, that easy huh?  :D Thanks for the help, and I've came to this site plenty of times before to look at scripts and what-not, just not ask for help.  ;) But thanks!  :)

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Re: Misson Win On Killing A Civilian
« Reply #3 on: 30 Dec 2009, 03:52:28 »
Another solution is to have in the condition field of a trigger the following:

Code: [Select]
!alive unitName
If dead, the trigger will, well.. trigger!  :scratch:

It can be size 0 x 0 and doesn't need to be activated by anyone. It can have the End #1 selected with the delay as mentioned in the above post which is still a method of doing it but if they do happen to move around then it could help soemone else looking for an answer :)

Offline Semedar

  • Members
  • *
    • Semedars Official Website
Re: Misson Win On Killing A Civilian
« Reply #4 on: 30 Dec 2009, 05:47:45 »
Aye, thanks for the tip.  :) It'll come useful for some people I'm sure. Thanks.  :)

Edit: Is it possible to have more than one unit in the condition field? Say when you kill two people (Bob, Joe) then the trigger activates.
« Last Edit: 30 Dec 2009, 05:59:08 by Semedar »

Offline Krieg

  • Mission Maker
  • Members
  • *
  • Who dares wins.
Re: Misson Win On Killing A Civilian
« Reply #5 on: 30 Dec 2009, 07:51:51 »
Maybe

Code: [Select]
!alive Bob && !alive Joe
In condition field would work?

If you see a light at the end of the tunnel, then it's probably an enemy tank.

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Re: Misson Win On Killing A Civilian
« Reply #6 on: 30 Dec 2009, 14:03:01 »
Yep you can use the above example if you want it to trigger when they are both dead. You can also do it so only one of the two has to die for it to trigger.

Code: [Select]
!alive Bob || !alive Joe
With that, only one of them have to die for it to trigger. Might come in handy.

Offline Semedar

  • Members
  • *
    • Semedars Official Website
Re: Misson Win On Killing A Civilian
« Reply #7 on: 31 Dec 2009, 01:18:42 »
Aye, thanks for the help! :)