Jump to content
pierremgi

Feature request: Make an option for trigger local in editor

Recommended Posts

Hi,

Today, triggers are global, and, in editor, it's possible to check a "server only" option. That's great for non duplication of activation in MP (code runs once). But that doesn't mean local for each clients.

Is it possible to add this option?

If local is checked, the condition met on a client will fire the code locally. Same as createTrigger  Local.

Share this post


Link to post
Share on other sites

Triggers are local and the only reason they seem to act as "global" because each client has its own copy of a trigger.

Share this post


Link to post
Share on other sites

Hi,

Today, triggers are global, and, in editor, it's possible to check a "server only" option. That's great for non duplication of activation in MP (code runs once). But that doesn't mean local for each clients.

Is it possible to add this option?

If local is checked, the condition met on a client will fire the code locally. Same as createTrigger  Local.

 

This doesn't make sense. You cannot set individual condition for each client individually in editor, you have to use mission script. And if you are going to use script anyway might as well script local triggers from the start.

Share this post


Link to post
Share on other sites

Thanks semiconductor && KK.

 

Yes, I understand the fact we are in editor and I used to script local triggers like in this conversation i had on ArmaHolic.

On the other hand, there is something missing:

- triggers are local but run on server + every clients by default,

- triggers can be run on server only,

- what about the new feature (scripted trigger local for effect local) ?

 

if editor content (mission.sqm) is loaded by each clients, why a trigger couldn't be effect local? On my mind, that doesn't mean "different" individual conditions.

Perhaps, I missed something (it's not the first time!). If you could have a look at the link and tell me my mistake, or why this couldn't be done via editor, changing the trigger engine?

 

Something like:

class Item144
        {
            dataType="Trigger";
            position[]={12036.325,5.4922376,2878.8521};
            angle=0;
            class Attributes
            {
                onActivation="<some code>;";
                onDeactivation="<some other code>;";
                sizeA=15;
                sizeB=10;
                sizeC=10;
                repeatable=1;
                activationBy="WEST";
                isRectangle=1;
                makeGlobal = false;
            };
            id=764;
            type="EmptyDetectorArea10x10";
        };

Share this post


Link to post
Share on other sites

Could you please give an example of how would you use an option (if there was one) in editor to set trigger local and what would happen? 

Share this post


Link to post
Share on other sites

Could you please give an example of how would you use an option (if there was one) in editor to set trigger local and what would happen? 

 

I hoped that trigger radio "ALPHA" to move the respawn point on player's position who called it, (my link above), was one good example. (I answered to Vapour's question)

 

I guess all radio triggers in MP could benefit of the caller position, for evac, reinforcements or spawns.

 

Radio type apart, I don't know. Each time, you want an effect  with a "local parameter" like the variable player, but not returned by thislist ? This could help somewhere. What was the need for adding this option on createTrigger command since v 1.43? Just to avoid if (isServer) then {...} in a script? I guess no! We are speaking about "local effect" which can be seen by other player (like a marker position). I prefer to mention "local param" instead of confusing "local effect" in this case.

 

Sorry, I'm thinking about that while writing at you. Same consideration for addAction, which is a command supposed to be EL. But here effect local doesn't mean "without any effect on other clients or server". That depends on behavior of the code, and the effects of the commands inside.

For example, on each playable units in init field :

this addaction ["spawn vehicle", {"B_MRAP_01_F" createVehicle getPosATL (_this select 1)},nil,0,false,true,"", "vehicle _target == vehicle _this"]

will create a Hunter visible everywhere, each time a client will fire it, but on this client's position.

Share this post


Link to post
Share on other sites

I also agree with this request.  At least for radio triggers.  Or give us the ability to use thislist to get the player that triggered the radio trigger so we can run the script only if he is local.  

 

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

×