Home   Help Search Login Register  

Author Topic: Different endings for different times.  (Read 639 times)

0 Members and 1 Guest are viewing this topic.

Olphy

  • Guest
Different endings for different times.
« on: 03 Nov 2005, 21:09:15 »
Hi.

I am trying to make a tense scene involving a distraught civilian with a loaded AK. I want it so that if the player shoots him whilst still in his state of shock, the mission goes into end2, which is a mission failure, whereas if they wait for him to shoot (in which he misses of course) the player can shoot him and the mission will carry on.

The point of this is that it musy be ok to shoot him in one second and not in the other. Any ideas?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Different endings for different times.
« Reply #1 on: 03 Nov 2005, 21:30:23 »
End#1 and End#2 both lead to the same Outro.     You could use ending type Loose for one of them but then you get no Debriefing text.

You must make it very clear to the player what he is supposed to do.

Add an eventHandler "killed" to the civvy.   If his killer is not the player, then something else happens.   If his killer is the player, then the script called by the EH checks the value of a variable.   This variable is initialised (say, set to false) in your init.sqs then set to true when the civvy fires.   If its false when the civvy dies you get the mission failed ending, if its true you get mission accomplished.
Plenty of reviewed ArmA missions for you to play

Offline MrN

  • Contributing Member
  • **
  • Pffff
Re:Different endings for different times.
« Reply #2 on: 03 Nov 2005, 21:32:29 »
Might be an off the wall suggestion but you could try using a global variable. Ie when you want End2 to be available you put in the condition field of your trigger:
Quote
!(alive upsetloon) && !BAZSHOT

So it'll only go off when he hasn't shot and when he isn't alive.

Use an eventhandler on upsetloon:

Quote
this addeventhandler ["fired",{_this exec "Ending2.sqs"}]


and put

Quote
BAZSHOT=true
exit

in the script. If that works when the dude fires, end2 will no longer trigger.

Good practice dicates (for me anyway) putting BAZSHOT=FALSE in your init.sqs

In theory anyway.  :P
In the 60's, people took acid to make the world weird. Now the world is weird and people take Prozac to make it normal.

Olphy

  • Guest
Re:Different endings for different times.
« Reply #3 on: 04 Nov 2005, 00:16:40 »
How about the use of IF commands? For instance, up until a point in the script, the IF command will detect whether he is dead or alive in the allocated time period, and if he is still alive by the time when it comes to him firing his weapon, there could be a deletevehicle command for the trigger activating end2?