Jump to content
Sign in to follow this  
Guest

Activate trigger when certain unit is in trigger area?

Recommended Posts

Guest

I have tried this:

unitname in thislist;

in the triggers condition field but didn't work. Any ideas?

Edited by Guest

Share this post


Link to post
Share on other sites

What about using a gamelogic present. I am not too familiar with how these work but I think that could be one way.

Share this post


Link to post
Share on other sites
Guest

I really don't have a clue when it comes to game logics:o

Share this post


Link to post
Share on other sites

Simply group the unit to the trigger.

Share this post


Link to post
Share on other sites
I have tried this:

unitname in thislist;

in the triggers condition field but didn't work. Any ideas?

Make sure the unit you want to activated the trigger is actually going into the trigger area.

In the Activation drop down box of the trigger, make sure you have ANYBODY selected then in the Condition box have unitname in thislist, and that will work.

Share this post


Link to post
Share on other sites
Guest

Thanks, I missed out the "Anybody" setting.

Share this post


Link to post
Share on other sites
Thanks, I missed out the "Anybody" setting.

Thought so, very common mistake, one which I still often do myself :)

Share this post


Link to post
Share on other sites
Simply group the unit to the trigger.

This. Please poeple stop trying to use command and script, and better learn the basis of the mission editor, such as trigger, grouping, synchronizing and waypoints. They are powerful enough to avoid script writing most of the time.

Share this post


Link to post
Share on other sites

But it also keeps your mission editor map looking nice and tidy, without having blue lines stretching all the way across the place :)

Also, you can't ungroup a trigger by mistake doing it this way, and also can have a number of conditions that have to be met for a trigger to activate.

So why just keep to the basics, and not learn more advanced ways of doing things.

Share this post


Link to post
Share on other sites
But it also keeps your mission editor map looking nice and tidy, without having blue lines stretching all the way across the place :)

Also, you can't ungroup a trigger by mistake doing it this way, and also can have a number of conditions that have to be met for a trigger to activate.

So why just keep to the basics, and not learn more advanced ways of doing things.

Amen to that.

Share this post


Link to post
Share on other sites

And not like grouping will do something more efficient than doing exactly same "unit in thislist" type of check.

Share this post


Link to post
Share on other sites
But it also keeps your mission editor map looking nice and tidy, without having blue lines stretching all the way across the place :)

Also, you can't ungroup a trigger by mistake doing it this way, and also can have a number of conditions that have to be met for a trigger to activate.

So why just keep to the basics, and not learn more advanced ways of doing things.

Because most of people here don't even know the very basics of the mission editor, and try to use command they hardly understand. They don't even know that you can use game logics together with waypoints in order to activate triggers, markers to randomize units presence etc.

Share this post


Link to post
Share on other sites

I'm having problems with activating a unit-specific trigger. What I've done is implement a trigger to initiate simultaneous explosions for these small fuel tanks when I enter the trigger area. I've typed the "unitname in thislist;" command in the trigger's condition field. However it hasn't worked. I named my unit and put that unit's name instead of "unitname".

Additional -- I've fixed it now, a lack of observation on my part hah.

Edited by Mach2Infinity

Share this post


Link to post
Share on other sites

i realise this is an old post but it somewhat goes towards my problem.

i have a bargate which i want to open for pilots and stay locked for all other units.

I did get it working perfectly in single player / editor preview but have no success in MP.

The reason i am not simply grouping the units with the gate is because players can leave the group.

here is what i have:

my bar gate: gate2

init field: this animate ["Bargate", 1]; gate=this execVM "gate.sqf"; this addEventHandler ["HandleDamage", {false}];

(gate sqf keeps the gate locked and prevents others from opening it via action menu)

lock = true;

while {lock}
do {
gate2 animate ["Bargate",1];
sleep 0.01;
   };

now i placed 2 triggers:

- to open the gate for pilots:

activation: Blufor / repeatedly / present / timeout

type: none

condition: Pilot1 in thislist or Pilot2 in thislist or Pilot3 in thislist or Pilot4 in thislist

on act: gate2 animate ["Bargate", 0]

on deact: gate2 animate ["Bargate", 1]

- to exclude pilots from the gate.sqf lock

activation: Blufor / repeatedly / present / timeout

type: none

condition: Pilot1 in thislist or Pilot2 in thislist or Pilot3 in thislist or Pilot4 in thislist

on act: lock= false

OK, as i said, in single player this works like a charm.

I walk up to it with a pilot and it opens up.

I try it with any other unit and it stays locked.

what am i missing to apply this to MP?

-----------

edit, now that have it written down neatly i realise that i seem to be doubling up here and probably wont need the first trigger..

but the problem still exists in MP.

Edited by McSpeed

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  

×