• 0
monkeybrain

Creating a activation trigger

Question

I was playing around with triggers in editor and wanted to see if it worked on exile so i put this into the SQM in exile.
 

class Entities
    {
    items=1;

class Item0
        {
            dataType="Trigger";
            position[]={9070.1221,130.87619,16045.862};
            class Attributes
            {
                onActivation="playsound""song"";";
                sizeA=100;
                sizeB=100;
                repeatable=1;
                activationBy="ANY";
                isRectangle=1;
            };
            id=252;
            type="EmptyDetectorAreaR50";
            atlOffset=0.40499878;
            };
            };

Works in editor, how would I get it to work in exile? Is it even possible? :P

Thanks

Share this post


Link to post
Share on other sites

5 answers to this question

  • 0

Hello Monkey,

I too had this issue.  I forget, but you need to set the 'side' to the player.  Otherwise everything and its brother will set this off over and over.

 

BUT, there is another bigger issue.  Triggers are ok, but they put a 'drain' on the system.  Many eons ago, the exile loot spawning was handled by triggers.  Too much work, so they switch to using 'math' to determine location.

I would recommend you use this method as it requires much less 'work' on the machines to detect when to 'fire off' this alarm.

Use you use this 'math' in a script which is run by all players, such as being launched via the mission PBO.

The math by the way, is trig, to help point you in the right direction!

:)

 

Share this post


Link to post
Share on other sites
  • 0

Hey, when you say side, do you mean who it's activated by ( say independant)? When i walk into the trigger in game, the sound doesn't trigger at all.

Do you have a example for the second method, i'm new to all of this. Do I put the trigger in a script and execute it in the init?

 

Share this post


Link to post
Share on other sites
Advertisement
  • 0

Hello,

Well, there is a lot of code examples that you can follow for this.

 

You also can get my short/simple 'No Kill Zones' script and it shows it in there:

:)

 

 

1 person likes this

Share this post


Link to post
Share on other sites
  • 0

Sweet, I got the trigger to work using systems in the mission.sqm, but your script worked for what I wanted as well. I used your way  since you say it causes less "drain".

1 person likes this

Share this post


Link to post
Share on other sites
  • 0

Well, it is not my 'saying'.  I did not think it was a big deal myself, till I saw the exile devs say so and remove the triggers from exile.  I am not a 'script god' and I strive to learn from others who are better than me.

Since that time, I have seen others come out and say the same thing.

The good thing is with a script such as mine, you can define all sorts of things.  With a trigger, well, you would have to have multiple triggers.

In my script for example, I could have it activate for men on the ground at 200m and for vehicles at 100m all in one script.  For triggers, I would have to have two; one for the 100m and one for the 200m.

 

Is it actually faster?  I heard it is, but I have never tested/timed it.

 

Oh well, you got it going...that's all that matters!  ;)

 

Good luck to ya!

:)

 

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.