Home   Help Search Login Register  

Author Topic: destroy  (Read 569 times)

0 Members and 1 Guest are viewing this topic.

Headhunter

  • Guest
destroy
« on: 19 Jun 2004, 00:07:09 »
how do you make so that when you have destroyed 4 specific units it says "objective complete" and you win the mission?

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:destroy
« Reply #1 on: 19 Jun 2004, 00:42:17 »
Name the 4 targets target1, target2, target3 and target4.

Then create a trigger.

type: end #1
cond: !(alive target1) and !(alive target2) and !(alive target3) and !(alive target4)
on act: "1" setobjstatus "DONE"

Of course, if the objective wasn't 1 you'd have to change that.

:beat: *Gets Shot* :beat:

Dubieman

  • Guest
Re:destroy
« Reply #2 on: 19 Jun 2004, 00:46:21 »
Well you make four triggers.

Trigger1: name this trigger1

in the condition field put   NOT ALIVE target1
you can make target1 whatever you want
in the activation field put
trigger1done=true


Trigger2= name this trigger2

in cond. put         NOT ALIVE target2

activation: trigger2done=true

Trigger3=  name this   trigger3

condition: NOT ALIVE target3
activation:  trigger3done=true

Trigger 4 =  name this   trigger4

condition:  NOT ALIVE target4
activation:  trigger4done=true

Now make a trigger 5 and in the condition field put

trigger1done; trigger2done; trigger3done; trigger4done

activation: "1" objstatus "DONE"; EndMission1



That should do it, the trigger1done might have a space like trigger1 done, but I'm not sure and some of the syntax isn't garunteed. Play around with it if it don't work. :P

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:destroy
« Reply #3 on: 19 Jun 2004, 00:48:42 »
Use my version, roachies all fecked up with wrong syntax and all. :P ;D

:beat: *Gets Shot* :beat:

CrashnBurn

  • Guest
Re:destroy
« Reply #4 on: 19 Jun 2004, 02:30:22 »
Use my version, roachies all fecked up with wrong syntax and all. :P ;D

:beat: *Gets Shot* :beat:


Ahem....clears throat. Speaking of wrong syntax.

on act: "1" setobjstatus "DONE"

Should be:  "1" objstatus "DONE"

Dubieman

  • Guest
Re:destroy
« Reply #5 on: 19 Jun 2004, 02:53:14 »
Err my answer says syntax isn't guarunteed so....
I'm not good at remembering code and all.  :( ;D

Anyways setobjstatus?  ;D :o

Mine's longer but I think but I dunno if mine is better if you want to implement titletext or something like target1 down.


I still gotta alotta learnin to do with ofp sytax... :P:tomato:

Headhunter

  • Guest
Re:destroy
« Reply #6 on: 19 Jun 2004, 09:20:37 »
thanks guys, now in can finaly finish my mission