Jump to content
Sign in to follow this  
UKSubmariner

Simple challenge

Recommended Posts

Okay, I'll try and keep this simple.

In a mission I've been making, 2 groups of WEST troops are trying to get to the same objective, (a1) and (a2)

Now how do I make it so that if the (a1) gets there first, (a2) fails it's objective to get there?

Cheers guys!

Share this post


Link to post
Share on other sites

make two triggers sycronized to the group leader actived by any memeber of the group. Then put in the activation field what scripts you want exec.

Share this post


Link to post
Share on other sites
make two triggers sycronized to the group leader actived by any memeber of the group. Then put in the activation field what scripts you want exec.

Cool. Cheers mate.

Share this post


Link to post
Share on other sites

Still having a little trouble.

I have two triggers.. one linked to the player unit (Trig1), another linked to a unit of allied soldiers (Trig2). Both synchronised to a seperate trigger.

Within Trig1 is the following setup

Quote[/b] ]

condition: This

On Activation: z1 setflagtexture "\flags\unitedkingdom.jpg";"1" ObjStatus "DONE";

On Deactivation:

Within Trig2

Quote[/b] ]

condition: This

On Activation: z1 setflagtexture "\flags\unitedkingdom.jpg";"1" ObjStatus "FAILED";

On Deactivation:

Now the final question is this. How can I make it so that if Trig2 is activated first, Trig1 wont be able to happen (And vice versa)

Share this post


Link to post
Share on other sites
Still having a little trouble.

I have two triggers.. one linked to the player unit (Trig1), another linked to a unit of allied soldiers (Trig2). Both synchronised to a seperate trigger.

Within Trig1 is the following setup

Quote[/b] ]

condition: This

On Activation: z1 setflagtexture "\flags\unitedkingdom.jpg";"1" ObjStatus "DONE";

On Deactivation:

Within Trig2

Quote[/b] ]

condition: This

On Activation: z1 setflagtexture "\flags\unitedkingdom.jpg";"1" ObjStatus "FAILED";

On Deactivation:

Now the final question is this. How can I make it so that if Trig2 is activated first, Trig1 wont be able to happen (And vice versa)

Easy.

In your onActivation :

z1 setflagtexture "\flags\unitedkingdom.jpg";"1" ; ObjStatus "FAILED"; BFAILED=TRUE

And then in the other trigger have condition as

!BFAILED

Insert a GAME LOGIC unit to initialise BFAILED and you're set:

BFAILED=false

Share this post


Link to post
Share on other sites
In your onActivation :

z1 setflagtexture "\flags\unitedkingdom.jpg";"1" ; ObjStatus "FAILED"; BFAILED=TRUE

And then in the other trigger have condition as

!BFAILED

Insert a GAME LOGIC unit to initialise BFAILED and you're set:

BFAILED=false

Sorry for being an eejit, but in which onactivation? Trig1 or 2

Share this post


Link to post
Share on other sites

Into init.sqs put<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">succes=true

Change conditions of both triggers to<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this and succes

and add<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">succes=falseinto both on activations fields.

So trig1:

Quote[/b] ]condition: This and succes

On Activation: z1 setflagtexture "\flags\unitedkingdom.jpg";"1" ObjStatus "DONE"; succes=false

On Deactivation:

and trig2:

Quote[/b] ]condition: This and succes

On Activation: z1 setflagtexture "\flags\unitedkingdom.jpg";"1" ObjStatus "FAILED"; succes=false

On Deactivation:

Share this post


Link to post
Share on other sites

Right thats that objective wrapped up. Cheers guys.

Now how do I make the mission so that it ends when obj's 1&2 are completed?

Share this post


Link to post
Share on other sites
How how do I make the mission so that it ends when obj's 1&2 are completed?

In init.sqs:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">obj1=false

obj2=falseThen add<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">obj1=trueto the completion of obj1 and<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">obj2=trueto the completion of obj2

and the condition of the ending trigger will be<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">obj1 and obj2

Share this post


Link to post
Share on other sites
succes

I'm sorry, but is the word succes spelt wrong? Should I type success into the trigger instead?

Share this post


Link to post
Share on other sites
succes

I'm sorry, but is the word succes spelt wrong? Should I type success into the trigger instead?

Yes, it's spelt wrong. sad_o.gif  smile_o.gif You can use even success. It's the name of variable (not the command) so it depends on you.

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  

×