Jump to content
Sign in to follow this  
kocrachon

Multiple Objective Help

Recommended Posts

So I am trying to make a mission where I have to blow up a building and then ex filtrate. I have one trigger set for destroying a building, and one trigger set to end 1 when I enter the area (the exfil zone)

Now what I want to do is make it to where I cannot exfil (set off trigger two) unless the first trigger is done, the trigger that is set for destroying the building. Anyone able to help me out?

Share this post


Link to post
Share on other sites

You sould use a variabel (do a search on the wiki for more info on it) to get it to work:

Do your normal stuff for both triggers

Then in the onactivation field of the one for blowing the house up put someting like Obj1=true

In the other trigger for the exfill in the conditions field you add And Obj1

Share this post


Link to post
Share on other sites

in my mission i did the same sort of thing. that obj1=true stuff is confusing at times so this is what i did:

firstly pay attention to the size of your end trigger, for example say its 20 by 10, no angle and a rectangle.

now change your end trigger's size to 0 and activation to "none", name it "exfil" for example. you could also set the type to "none" instead of END1.

next go to your objective trigger and in the "on activation" put this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

exfil setTriggerArea [20, 10, 0, true]; exfil setTriggerActivation [WEST, PRESENT, false]

if you set the type from end1 to none, add this to the end:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

exfil setTriggerArea [20, 10, 0, true]; exfil setTriggerActivation [WEST, PRESENT, false]; exfil setTriggerType "END1"

thats it!

heres the commands so you can see how to work them:

http://community.bistudio.com/wiki/setTriggerArea

http://community.bistudio.com/wiki/setTriggerActivation

http://community.bistudio.com/wiki/setTriggerType

Share this post


Link to post
Share on other sites

Hmm it works, but I do tend to get an error in the game.

black box int he top left, doesnt really say much in terms of importance, and the mission goes off with out a hitch, but I wont worry about it now =P

Share this post


Link to post
Share on other sites
Hmm it works, but I do tend to get an error in the game.

black box int he top left, doesnt really say much in terms of importance, and the mission goes off with out a hitch, but I wont worry about it now =P

what does it say?

Maybe anyone could help you to get rid of it.

Share this post


Link to post
Share on other sites

Ok I need more help with that and obj.

I am trying to make a mission now where I have to destroy 3 objectives. So could some one give me some decent steps on how to make it work? I dont understand though why I would add obj1=true. Wouldn't I need to make it Dest=true?

Cause I want it to where when I stand in an area the mission will end. But I want to make the conditions to the objective be that I destroyed the 3 other objectives, anyone able to hand me some steps on how to do it.

Share this post


Link to post
Share on other sites

Also, if anyone else can help me out with something else to go with that. Since I cant give helicopters a command to land on their own, I have a hold waypoint for a helicopter that has an on activation of land, so that it will land and shut its engines off so it has plenty of fuel for later. anyways.

Is it possible for me to string on commands after that to where it will take back off and finish the way points after that hold way point? Because right now it takes of, drops off my guys, and fly off to base again, and then it has a hold way point, and that hold way point makes him land.

So now I want it to take off after I finish the objectives, fly to me, come pick me up, and fly me back to the base, where I will walk into the exfil point, which I am sure I will use the same segment of the exfil trigger, but I need to know what command will set it to go to the next waypoint out of its hold waypoint.

Share this post


Link to post
Share on other sites
Quote[/b] ]I am trying to make a mission now where I have to destroy 3 objectives. So could some one give me some decent steps on how to make it work? I dont understand though why I would add obj1=true. Wouldn't I need to make it Dest=true?

thats why you use my way :P that way the trigger cant be activated until the last objective is complete. anyway "obj1" is a name that is made up, called a "variable"

you could call it "horsepoop" if you want (horsepoop=true) biggrin_o.gif and yes "dest" would work too. he just said "obj1", so you know as the mission maker what its activating.

in your end trigger put in the condition

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> obj1=true AND obj2=true AND obj3=true

in your first objectives trigger put in the activation field <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">obj1

in your second objectives trigger put in the activation field <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">obj2

in your third objectives trigger put in the activation field <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">obj3

that should be it.

for the heli problem make a trigger and for type make it a SWITCH, then syncronize that trigger with the hold waypoint...now when the trigger is activated the pilots will continue to the next waypoint after the HOLD.

Share this post


Link to post
Share on other sites

so do I just put Obj1=true or just Obj1?

And for that trigger that makes the helicopter move, I just make a switch trigger that says Obj1=true and obj2=true just like that mission ending trigger correct?

Share this post


Link to post
Share on other sites

Ok here is how my triggers are set right now. And its currently ending the mission the second I start...

Objective 1

Activation:Vehicle [i have it grouped with the vehicle to make it the target

Activation: Once

Not Present

Switch

Name: Empty

Condition: This

On Act. Obj1=true

Objective 2

Activation:Vehicle

Activation: Once

Not Present

Switch

Name: Empty

Condition: This

On Act. Obj2=true

Exfil Objective

Activation: Bluefor

Present

End #1

condition: Obj1 and obj2

Share this post


Link to post
Share on other sites

yeah that should work for the heli.

for objective 1 and 2 they dont need to be "switch" triggers unless they are syncronized with a waypoint and the name should be obj1 and obj2 for their respective triggers.

other then that i cant see whats wrong without making a test mission and trying it out myself.

Share this post


Link to post
Share on other sites

Right now I have it set under the class mission like this.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">version=11;

class Mission

{

b1d=false;

b2d=false;

addOns[]=

{

"sara",

"cacharacters",

"CATracked"

};

and here is what I have in my sensors.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class Sensors

{

items=3;

class Item0

{

position[]={2553.353271,13.905000,2835.274658};

a=5.000000;

b=5.000000;

activationBy="VEHICLE";

activationType="NOT PRESENT";

interruptable=1;

type="SWITCH";

age="UNKNOWN";

idVehicle=2;

expActiv="b1d=true";

class Effects

{

};

};

class Item1

{

position[]={2514.485352,13.905000,2834.865723};

a=5.000000;

b=5.000000;

activationBy="VEHICLE";

activationType="NOT PRESENT";

interruptable=1;

type="SWITCH";

age="UNKNOWN";

idVehicle=1;

expActiv="b2d=true";

class Effects

{

track="ATrack24";

};

};

class Item2

{

position[]={2537.263428,13.905000,2725.933838};

a=20.000000;

b=20.000000;

activationBy="WEST";

interruptable=1;

type="END1";

age="UNKNOWN";

expCond="this and b1d and b2d";

class Effects

{

};

};

};

};

So what am I doing wrong? I was told Id have to put those in to make this all work.

Share this post


Link to post
Share on other sites

also smoke, when I put obj1=true AND obj2=true AND obj3=true into my condition line it gives me an error and tells me I need to put in a ;

Share this post


Link to post
Share on other sites
also smoke, when I put obj1=true AND obj2=true AND obj3=true into my condition line it gives me an error and tells me I need to put in a ;

Sorry to intervene.

If you want to check a boolean value you don't need to add = true

instead try using:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">obj1 AND obj2 AND obj3

However, if you want to check if they are false, you can not use(???)

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">obj2=false for the second argument/condition

e.g.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">obj1=false AND obj2=false AND obj3

instead you need to use

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">NOT obj2

e.g.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">obj1=false AND NOT obj2 AND obj3

I dunno why it works for the first and not the second argument.

Also instead of using NOT you could use ! they do the same thing, read more:

http://community.bistudio.com/wiki/Operators

Share this post


Link to post
Share on other sites

thanks taurus you are probably more knowledgeable about that then me.

havoc is your mission objectives made so you can kill either obj1 or obj2 first but you have to kill them both before it ends? or do you kill obj1 first then move on to obj2 then end?

if its the latter (kill 1 then 2 then end) just do as i suggested in my first post. in your objective 2's trigger in the on activation:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

exfil setTriggerActivation ["west", "present", false]; exfil setTriggerType "END1"

for your exfil trigger just set its size and leave its activation to none and type none. once obj2 is complete that script will set the parameters to end the mission.

Share this post


Link to post
Share on other sites

Ok, heres how my mission works right now.

There are 4 structures lined up beside each other. And I need to take them all out. It does not matter in what order as long as they all go down. Then, after you blow up all 4 you exfil to the next town over in a specific intersection.

So I just need to set it to where you cant exfil until you have blow up all 4 structures properly. And it will not matter in what order.

And now I am getting confused with these variables.

So if I am understanding correctly, I don't need to write anything into the mission.sqm correct?

I don't suppose anyone could like, write one of the building triggers out for me and then end trigger me =P so i can understand in the long run.

Share this post


Link to post
Share on other sites

Also, I know how to make it to where it requires me to destroy them in a specific order, thats easy, its just like you said smoke, except instead of exfil, I make it to where trigger 1 activates 2, then after 2 is done it activates trigger 3, and so forth and so forth. But this whole thing throws a wrench into everything when I try to make it to where I can blow them up in any specific order.

However, I have a quick question. Can I just do it the way smoke tells me to with doing them in order. But then say, I do objectives 2, 3, and 4 first, and then do one, it will set off the triggers in a chain, so to speak, and then activate that last trigger? If that makes sense at all.

Like, trigger 1 being done activates trigger 2, trigger 2 being done activates trigger 3, and then doing trigger 3 activates trigger 4, and then trigger 4 activates the final exfil trigger.

Now say instead of doing trigger 1 first, I walk up to trigger 4, and do the destroying of that building first, but since that trigger hasn't been activated I go and destroy the other 3, then since its been destroyed, the time frame comes around to destroy it, but its already destroyed, so instantly activates the exfil trigger... I hope that made sense.

Also, how would I make it set to have trigger one set to activate trigger two. Since its about being not present, and on a specific tank, what would I set it as?

exfil setTriggerActivation [b1D, PRESENT, false];

FYI, B1D is the name of the building I am destroying.

Share this post


Link to post
Share on other sites

On problem, when i do what smoke has be doing, I get this when I blow up a building. However the mission still does work.

errorgh3.jpg

Also I am having an issue. When I try to set the first building to activate the other buildings trigger, I don't know what to type, the game wont let me put "VEHICLE" like I would be able to as when i group the trigger with the empty tank i am trying to test this on. It tells me invalid number in expression. and right next to where I have VEHICLE typed it shows |#| in the black box at the top of the screen. So am I suppose to type something their or what?

Looks like this [Vehicle |#|, NOT PRESENT, false]

Share this post


Link to post
Share on other sites

heres all the script commands, just check out the settrigger*** commands (under s wink_o.gif)

http://community.bistudio.com/wiki/Category:Scripting_Commands_ArmA

it looks like you are forgetting the quotes around "west" and "present"

so it should look like this ["Vehicle", "NOT PRESENT", false]

ill try and make a test mission for you, but it may take me until tomorrow to finish because i wont be home for awhile.

Share this post


Link to post
Share on other sites

Here are my triggers

Trigger 1

Size 5,5,0

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Activcation - Vehicle (for some reason it considered empty objects vehicles)

Not Present

Time Out

Type - None

Condition - This

Activation - T1 setTriggerArea [5, 5, 0, true]; T1 setTriggerActivation ["VEHICLE", "NOT PRESENT", "false"]; T1 setTriggerType "none"

Trigger 2

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

Size 0,0,0

Activation - Vehicle

Present (Since its size is 0,0,0, it will activate the last waypoint if i set it as not present, so I have it set to present until the other waypoint triggers it)

Time Out

Type None

Condition - This

exfil setTriggerArea [20, 20, 0, true]; exfil setTriggerActivation ["WEST", "PRESENT", false]; exfil setTriggerType "END1"

Trigger 3 just ends when bluefor are present.

Thats what I have the current on activation set too, and T1 is the name of the trigger it needs to set off.

But the new problem I got actually, is for some reason, that is not setting off trigger 2, because now when I destroy trigger 2, it does not activate the exfil point...

Don't suppose I could email this mission to anyone so they could take a quick look at it?




			
		

Share this post


Link to post
Share on other sites

Ive got it to stop comming up with the error by taking the " " off of true, but I still cant get it to activate the last objective.

Share this post


Link to post
Share on other sites

yeah send me the mission i think i can come up with a way to do it.

i tried the mission and im running into the same problem as you, the end trigger doesnt trigger off...if they are empty vehicles it might be easier.

zip it up and upload it to yousendit.com or something then PM the link or post it here in case someone else wants to help (please do im kinda new myself smile_o.gif)

Share this post


Link to post
Share on other sites

bump from page 3 to page 1, cant believe how fast it fell back in pages.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×