Barba-negra 117 Posted October 3, 2018 Hi all guys I come here asking for help, I'm creating a trigger in the IniplayerLocal, that makes an effect on the player when he enters the area, but I have followed all the steps and I still can not find it, I do not know what I will be wrong, when I enter the area nothing happens, but if I launch a scripts only with the command of the visual effect is generated the effect to all, what could I do? please help trg = createTrigger ["EmptyDetector", getPos central1]; trg setTriggerArea [8879.413, 7455.518, -1, false]; trg setTriggerActivation ["NONE", "PRESENT", true]; trg setTriggerStatements ["", "", ""]; Sleep 5; waitUntil{ !isNil "BIS_fnc_init" && time > 0 }; _trigger = trg; if ( player inArea _trigger ) then { 0 = ["ChromAberration", 200, [0.05, 0.05, true]] spawn { params ["_name", "_priority", "_effect", "_handle"]; while { _handle = ppEffectCreate [_name, _priority]; _handle < 0 } do { _priority = _priority + 1; }; _handle ppEffectEnable true; _handle ppEffectAdjust _effect; _handle ppEffectCommit 5; waitUntil {ppEffectCommitted _handle}; uiSleep 3; comment "admire effect for a sec"; _handle ppEffectEnable false; ppEffectDestroy _handle; }; }; _trigger triggerAttachVehicle [ player ]; _trigger setTriggerActivation [ "VEHICLE", "PRESENT", true ]; _trigger setTriggerStatements [" 0 = [ 'ChromAberration ', 200, [0.05, 0.05, true]] spawn { params [ '_name ', '_priority ', '_effect ', '_handle ']; while { _handle = ppEffectCreate [_name, _priority]; _handle < 0 } do { _priority = _priority + 1; }; _handle ppEffectEnable true; _handle ppEffectAdjust _effect; _handle ppEffectCommit 5; waitUntil {ppEffectCommitted _handle}; uiSleep 3; comment 'admire effect for a sec '; _handle ppEffectEnable false; ppEffectDestroy _handle; }; ", " Hint '' '' ]; Share this post Link to post Share on other sites
Larrow 2811 Posted October 3, 2018 Im not quite sure from your code, but is this what you are trying to achieve? waitUntil{ time > 0 }; TAG_fnc_spawnEffect = { //Create PP effect private _handle = ppEffectCreate [ "ChromAberration", 200 ]; //Enable effect _handle ppEffectEnable true; //Set effect parameters _handle ppEffectAdjust [ 0.05, 0.05, true ]; //Fade in effect _handle ppEffectCommit 5; //Wait unitl effect has been faded in waitUntil{ ppEffectCommitted _handle }; //pause uiSleep 3; //Reset effect parameters _handle ppEffectAdjust [ 0, 0, true ]; //Fade out _handle ppEffectCommit 5; //Wait unitl effect has faded out waitUntil{ ppEffectCommitted _handle }; //Disable effect _handle ppEffectEnable false; //Destroy effect ppEffectDestroy _handle; }; _trg = createTrigger [ "EmptyDetector", getPos central1 ]; _trg setTriggerArea [ 8879.413, 7455.518, -1, false ]; _trg triggerAttachVehicle [ player ]; _trg setTriggerActivation [ "VEHICLE", "PRESENT", true ]; _trg setTriggerStatements [ "this", "[] spawn TAG_fnc_spawnEffect", "" ]; 1 Share this post Link to post Share on other sites
Barba-negra 117 Posted October 3, 2018 Yes, what I try to do is that only the player who is in the area can receive the effect, and those who are out of the area can not, thanks @Larrow Share this post Link to post Share on other sites