Jump to content
Sign in to follow this  
theavonlady

Noob trigger question

Recommended Posts

Simple questions (I think).

I want to create a trigger when the player is detected. I've found the following in a sample mission where this is done:

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

{

items=7;

class Item0

{

position[]={7097.460938,122.461380,5524.909180};

a=100.000000;

b=100.000000;

activationBy="WEST";

activationType="EAST D";

age="UNKNOWN";

expActiv="s10 say ""siren"";s11 move getpos player";

class Effects

{

};

};

<span id='postcolor'>

What relevance is there to position= when the important thing is that the player has been detected?

What do a= and b= do?

Sometimes I see angle= in similar trigger. What's that?

TIA. smile.gif

Share this post


Link to post
Share on other sites

I think detecting by trigger works only for soldiers inside the trigger area - not generally at whole map.

a and b determines size of that area.

angle= is in degrees. Default is 0, same as for units. If you have for example rectangular trigger with different a and b sides and you start to rotate with that trigger, you are changing angle= value in that time. You will not see any graphical change when you rotate circle.  smile.gif

Share this post


Link to post
Share on other sites

Thanks. That's clear.

When one soldier detects, is there a way to change the behavior of remaining soldiers in the mission from SAFE to make them fully aggressive?

Share this post


Link to post
Share on other sites

One way is to make trigger that covers the whole mission area

activated : by east once

condition : this and detected

on activation :

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

{_x setBehaviour "combat"} forEach thislist

<span id='postcolor'>

and on activation of detecting trigger :

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

detected=true<span id='postcolor'>

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (theavonlady @ Jan. 13 2003,20:26)</td></tr><tr><td id="QUOTE">When one soldier detects, is there a way to change the behavior of remaining soldiers in the mission from SAFE to make them fully aggressive?<span id='postcolor'>

Every ennemy unit goes on combat mode when it detects a unit of yours.

By using that kind of trigger, you can set whatever unit you want to go on combat(aware or else) mode as soon as one unit (make it blue, light blue smile.gif ) detects one (or more) other unit.

Maybe you want the whole population to run at you when one sees you ? crazy.gif

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote ()=Obi=( @ Jan. 14 2003,07:49)</td></tr><tr><td id="QUOTE">Maybe you want the whole population to run at you when one sees you ?  crazy.gif<span id='postcolor'>

No but there are about a dozen soldiers strolling around town. When one of them detects me and shouts an alarm to the others (small town smile.gif ), I expect them all to be at the ready.

Share this post


Link to post
Share on other sites

Small town, he ?

You could have one come in the church and ring the bell biggrin.gif

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote ()=Obi=( @ Jan. 14 2003,07:59)</td></tr><tr><td id="QUOTE">Small town, he ?

You could have one come in the church and ring the bell  biggrin.gif<span id='postcolor'>

Job already taken.

quasimodo.jpg

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  

×