Jump to content

Recommended Posts

Hello, I want a cutText to be visible only to the trigger caller.

I have the trigger activation for any player, so anyone can be the caller.

 

How would I go about this when the text appears to everyone, but it shouldn't.

 

cutText ["<t size='2' font='EtelkaMonospaceProBold'>The text which should appear.</t>", "PLAIN", -1, true, true];

 

Thanks in advance! 🙂

Share this post


Link to post
Share on other sites

Trigger Condition:

true

Trigger Activation:

thisTrigger setTriggerActivation[ "VEHICLE", "PRESENT", false ];
thisTrigger triggerAttachVehicle[ player ];
thisTrigger setTriggerStatements[
    "this",
    "cutText [""<t size='2' font='EtelkaMonospaceProBold'>The text which should appear.</t>"", ""PLAIN"", -1, true, true];",
    ""
];

 

When a client loads the map the trigger will fire( true ), changing the activation to VEHICLE and setting the player as the vehicle. Also changes the OnActivation to your cutText.

When the player enters the trigger only he will see the cuttext.

 

This is possible as all triggers are local to each client and all trigger scripting commands are local effect only. So the trigger is globally placed in the editor but each connecting client resets the trigger to only be activated by themselves.

 

  • Thanks 1

Share this post


Link to post
Share on other sites
13 hours ago, Larrow said:

Trigger Condition:


true

Trigger Activation:


thisTrigger setTriggerActivation[ "VEHICLE", "PRESENT", false ];
thisTrigger triggerAttachVehicle[ player ];
thisTrigger setTriggerStatements[
    "this",
    "cutText [""<t size='2' font='EtelkaMonospaceProBold'>The text which should appear.</t>"", ""PLAIN"", -1, true, true];",
    ""
];

 

When a client loads the map the trigger will fire( true ), changing the activation to VEHICLE and setting the player as the vehicle. Also changes the OnActivation to your cutText.

When the player enters the trigger only he will see the cuttext.

 

This is possible as all triggers are local to each client and all trigger scripting commands are local effect only. So the trigger is globally placed in the editor but each connecting client resets the trigger to only be activated by themselves.

 

 

Thanks! I'll try it soon with a friend.

Share this post


Link to post
Share on other sites

Everything works well, and all with the above. Thank you!

But, how would I go about targeting the cutText to a specific player; let's say _caller of a holdAction?

 

I've got the holdAction working, just don't know how to target specifically the _caller of the action.

 

Thanks in advance! 🙂

Share this post


Link to post
Share on other sites

I guess you are talking bout BIS_fnc_holdActionAdd, are you?

 

The biki tells you exactly how to get the caller of that action:

Quote

params ["_target", "_caller", "_actionId", "_arguments"];

 

 

Share this post


Link to post
Share on other sites
59 minutes ago, sarogahtyp said:

I guess you are talking bout BIS_fnc_holdActionAdd, are you?

 

 The biki tells you exactly how to get the caller of that action:

 

Yes, but I don't really know much about scripting, so I wouldn't know how.

I could put a cutText that on completion shows a cutText to all players, but how would have to only be visible for the _caller?

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

×