Home   Help Search Login Register  

Author Topic: Surrender after heavy losses...  (Read 1802 times)

0 Members and 1 Guest are viewing this topic.

Kammak

  • Guest
Re:Surrender after heavy losses...
« Reply #15 on: 13 May 2004, 23:12:46 »
One idea:

On the second trigger, change it to Anybody, Present, Repeatedly

Condition:

Code: [Select]
(player countEnemy thislist <= .2*varTotalBadGuys) && (player countFriendly thislist > player countEnemy thislist)

That should do it.  But I have not actually tested it!   And this is assuming the player is not on the side you want to surrender! :)

Kammak

  • Guest
Re:Surrender after heavy losses...
« Reply #16 on: 13 May 2004, 23:39:35 »
Scratch that condition above.  

Try this instead as the condition for the second trigger (Anybody,Repeatedly, Present):

Code: [Select]
(east countSide thislist<=.2*varTotalBadGuys) && (west countSide thislist > east countside thislist)

This I tested and seems to work okay.


« Last Edit: 13 May 2004, 23:40:42 by Kammak »

Offline Clue

  • Members
  • *
    • Clue's OFP Page
Re:Surrender after heavy losses...
« Reply #17 on: 14 May 2004, 09:41:21 »
Thanks again Kammak!

 I give it a go this afternoon, and hopefully there'll be a new mission ready for beta testing soon.
 ;D

Offline Clue

  • Members
  • *
    • Clue's OFP Page
Re:Surrender after heavy losses...
« Reply #18 on: 15 May 2004, 12:59:40 »
So near... and yet so far  :-\

 The new trigger works fine but with one small problem... everybody surrenders (east and west)!
 At the moment I have this in the 'On Activation' box of trigger 2:

{[_x] exec ""surrender.sqs""} forEach thislist

which obviously counts all units in the trigger. How do I get it to only effect the East units? Would it be something like:

{[_x] exec ""surrender.sqs""} forEach thislist and not ((west_units) in thislist)

or am I way off the mark?

Offline Clue

  • Members
  • *
    • Clue's OFP Page
Re:Surrender after heavy losses...
« Reply #19 on: 17 May 2004, 13:47:53 »
Nearly there...  :)

 I put a new line in the surrender.sqs...


? side _Unit == west : goto exit

... and this seemed to do the trick. Now only the East units surrender.

 I still have one more question though  :-[

 Once the surrender.sqs has been activated, I want to begin a cutscene. How do I make the camera target the nearest alive east unit (who is now surrendering)? In an ideal world it would be the nearest eastern unit to the player, but it doesn't have to be.

 I can't quite get my head around the randomness of eastern casualties to work out how to target!

 You've been most helpful so far guys... hope I'm not asking for too much.