OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Hank Hill on 28 Aug 2002, 18:21:17

Title: If Unitname Is Dead
Post by: Hank Hill on 28 Aug 2002, 18:21:17
How do i make a trigger that will activate it a group of things is eliminated. I have some barrels that need to be blown up, and i need a trigger that will activate when they are blown. Second how do i make a trigger that can only be activated when objective is complete? After the barrels are exploded i want the men to be able to return to base and end mission, but they will start in that base so i cant have the mission ending straight away
Title: Re:If Unitname Is Dead
Post by: icarus_uk on 28 Aug 2002, 18:50:05
For your barrels.  Pick a barrel is the middle as a good refernace barrel and give it a name.  Then make a trigger with the condition as this;

!(Alive BarrelName)

And the activation as this;

"1" ObjStatus "DONE"; obj1=true

This will tick off the first objective in your briefing, if you have one (change the number if this is not the first objective).  And it will also set a variable which you can use in the base at the end.

With a trigger over tha base, group the players group with the trigger (F2), this gives you new options, make it group present and set it do condition;

This && obj1=true
Title: Re:If Unitname Is Dead
Post by: Hank Hill on 28 Aug 2002, 19:24:54
that great, works fine execept "this && obj1=true" the trigger wont recognise that command. Have i done something wrong? i put exactly that in its init field
Title: Re:If Unitname Is Dead
Post by: LCD on 28 Aug 2002, 19:26:58
yea u dont need da =true part

u just need 2 put

this and obj1

LCD OUT
Title: Re:If Unitname Is Dead
Post by: Messiah on 28 Aug 2002, 19:28:57
that condition should be just:

this and obj1

or

this && obj1
Title: Re:If Unitname Is Dead
Post by: LCD on 28 Aug 2002, 19:31:24
@ mezzy - i answered b4 u  :P

if u edit/delete ur msg i wil forgive u  ;)  ;D  ::)

LCD OUT

P.S need transelition ?  :P
Title: Re:If Unitname Is Dead
Post by: Hank Hill on 28 Aug 2002, 20:09:53
ok, this is off subject a little but its related. How can i make it so when both objectives are complete you can then use a radio command?
Title: Re:If Unitname Is Dead
Post by: icarus_uk on 28 Aug 2002, 20:33:22
In the activation of your barrel dead and in the trigger put;

1 SetRadioMsg "Whatever you want here"

This will turn the message on the alpha channel to what you put in the last set of " ".  You can use "1" SetRadioMsg "Null" if you want to make it blank.  1 is for alpha, 2 is for bravo etc.
Title: Re:If Unitname Is Dead
Post by: LCD on 28 Aug 2002, 20:33:42
just write in da text field of da radio triger "null"

in da on activision of da trigs dat complete da objectives write

trig 1 : obj1 = true

trig 2 : obj2 = true

now make trig like dat

trig
condition field : obj1 and obj2
on activision : radiochanel setradiomsg "text"

radiochanel is number between 1 nd 8

1 is radio alpha
2 is radio bravo
etc

LCD OUT