Black_Ice931 5 Posted March 15, 2019 Hey guys, Very easy question: how can I start a trigger after an action is done? In my case: I have have to talk to someone, after that I wouold like to complete the mission. Help? Cheers. Share this post Link to post Share on other sites
pierremgi 4738 Posted March 15, 2019 On server(initServerLocal.sqf in MP, init.sqf in SP) , set a variable like: sentencePassed = FALSE; publicVariable it, if in MP: publicVariable "sentencePassed"; Inside your addActionCode, just add: sentencePassed = TRUE; publicVariable it, if MP In your trigger add in condition field: ... && sentencePassed Share this post Link to post Share on other sites
Black_Ice931 5 Posted March 15, 2019 I'm definitely not the most expert coder here, so... 6 minutes ago, pierremgi said: sentencePassed = FALSE; publicVariable "sentencePassed"; This is what I need to add in my initServerLocal.sqf. 7 minutes ago, pierremgi said: Inside your addActionCode Where do I find it? 8 minutes ago, pierremgi said: ... && sentencePassed And those dots will stay or do I need to insert something there? Share this post Link to post Share on other sites
pierremgi 4738 Posted March 15, 2019 let's keep it simple: single player or multiplayer scenario? Share this post Link to post Share on other sites
Mr H. 400 Posted March 15, 2019 Simpler: this addaction ["talk", {missionNamespace setVariable ["sentencedPassed",true,true]}];//in you npc''s in it field. Set your trigger condition to : sentencePassed and that's it! 2 Share this post Link to post Share on other sites
Black_Ice931 5 Posted March 16, 2019 On 3/15/2019 at 8:07 PM, Mr H. said: Simpler: this addaction ["talk", {missionNamespace setVariable ["sentencedPassed",true,true]}];//in you npc''s in it field. Set your trigger condition to : sentencePassed and that's it! Another question! This works, but I want to use a script to create a marker after that action, how can I call it after that as been done? Script is this: _comandantepos = getPos latta; _marker1 = createMarker ["Comandate", _comandantepos]; _marker1 setMarkerShape "ICON"; _marker1 setMarkerType "hd_objective"; _marker1 setMarkerSize [1, 1]; _marker1 setMarkerColor "ColorBlack"; _marker1 setMarkerText "Comandate"; removeAllActions contatto; Thanks Share this post Link to post Share on other sites
Mr H. 400 Posted March 16, 2019 Just put it on the on activation partof your trigger or add it to the code of the addaction 1 Share this post Link to post Share on other sites
jts_2009 96 Posted March 17, 2019 Why you want to start a trigger and not a script..? Or are you so horny to write all stuff in one line..? 1 Share this post Link to post Share on other sites
pierremgi 4738 Posted March 17, 2019 46 minutes ago, jts_2009 said: Why you want to start a trigger and not a script..? Or are you so horny to write all stuff in one line..? Why not? Depending on your skill, and your aim (area, loop, pre-cond..) 1 Share this post Link to post Share on other sites