xoo 10 Posted February 18, 2015 Hello, Is there any way to list all triggers on the map ? (placed on editor or dynamicly generated) I would list them in order to get their names. Share this post Link to post Share on other sites
jshock 513 Posted February 18, 2015 _allTriggerNames = []; { if (typeOf _x isEqualTo "EmptyDetector") then { _allTriggerNames pushBack (vehicleVarName _x); }; } forEach vehicles; { hintSilent _x; sleep 2; } forEach _allTriggerNames; Share this post Link to post Share on other sites
killzone_kid 1332 Posted February 19, 2015 Hello,Is there any way to list all triggers on the map ? (placed on editor or dynamicly generated) I would list them in order to get their names. [color="#FF8040"][color="#1874CD"]_alltriggers[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]allMissionObjects[/b][/color] [color="#7A7A7A"]"EmptyDetector"[/color][color="#8B3E2F"][b];[/b][/color][/color] Made with KK's SQF to BBCode Converter Share this post Link to post Share on other sites
fn_Quiksilver 1636 Posted February 19, 2015 [color="#FF8040"][color="#1874CD"]_alltriggers[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]allMissionObjects[/b][/color] [color="#7A7A7A"]"EmptyDetector"[/color][color="#8B3E2F"][b];[/b][/color][/color] Made with KK's SQF to BBCode Converter Yep, keep in mind though that "EmptyDetector" catches also game logics and curator modules, so will have to filter that array. Share this post Link to post Share on other sites
xoo 10 Posted February 19, 2015 Thx a lot guys !! :) no matters for filtering the array... that's the goal. now i hope i can use a joker (*) when filtering my array. Share this post Link to post Share on other sites
killzone_kid 1332 Posted February 19, 2015 Yep, keep in mind though that "EmptyDetector" catches also game logics and curator modules, so will have to filter that array. Could you please, please stop talking rubbish? allMissionObjects "EmptyDetector" does not detect "Logic" and never did. allMissionObjects "Logic" detects "Logic". If you just spent 5 min testing it yourself like I always do you wouldn't be spreading misinformation trying to challenge my every post. Share this post Link to post Share on other sites
fn_Quiksilver 1636 Posted February 19, 2015 My apologies. Most of the poking I did into this was 1 year ago. I'd remembered (perhaps incorrectly?) capturing game logics in the "EmptyDetector" object class. Share this post Link to post Share on other sites
killzone_kid 1332 Posted February 19, 2015 My apologies. Most of the poking I did into this was 1 year ago. I'd remembered (perhaps incorrectly?) capturing game logics in the "EmptyDetector" object class. It is possible that some kind of capture logic uses trigger, and perhaps it even inherits from "EmptyDetector". Share this post Link to post Share on other sites
R3vo 2654 Posted February 19, 2015 [color="#FF8040"][color="#1874CD"]_alltriggers[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]allMissionObjects[/b][/color] [color="#7A7A7A"]"EmptyDetector"[/color][color="#8B3E2F"][b];[/b][/color][/color] Made with KK's SQF to BBCode Converter This line returns an array which looks like this: [color="#FF8040"][color="#8B3E2F"][b][[/b][/color][color="#FF0000"]43[/color][color="#8B3E2F"][b]:[/b][/color] [color="#8B3E2F"][b]<[/b][/color]no shape[color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]51[/color][color="#8B3E2F"][b]:[/b][/color] [color="#8B3E2F"][b]<[/b][/color]no shape[color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]32[/color][color="#8B3E2F"][b]:[/b][/color] [color="#8B3E2F"][b]<[/b][/color]no shape[color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]33[/color][color="#8B3E2F"][b]:[/b][/color] [color="#8B3E2F"][b]<[/b][/color]no shape[color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]39[/color][color="#8B3E2F"][b]:[/b][/color] [color="#8B3E2F"][b]<[/b][/color]no shape[color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]44[/color][color="#8B3E2F"][b]:[/b][/color] [color="#8B3E2F"][b]<[/b][/color]no shape[color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]42[/color][color="#8B3E2F"][b]:[/b][/color] [color="#8B3E2F"][b]<[/b][/color]no shape[color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]50[/color][color="#8B3E2F"][b]:[/b][/color] [color="#8B3E2F"][b]<[/b][/color]no shape[color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]45[/color][color="#8B3E2F"][b]:[/b][/color] [color="#8B3E2F"][b]<[/b][/color]no shape[color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]47[/color][color="#8B3E2F"][b]:[/b][/color] [color="#8B3E2F"][b]<[/b][/color]no shape[color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]49[/color][color="#8B3E2F"][b]:[/b][/color] [color="#8B3E2F"][b]<[/b][/color]no shape[color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]41[/color][color="#8B3E2F"][b]:[/b][/color] [color="#8B3E2F"][b]<[/b][/color]no shape[color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]46[/color][color="#8B3E2F"][b]:[/b][/color] [color="#8B3E2F"][b]<[/b][/color]no shape[color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]34[/color][color="#8B3E2F"][b]:[/b][/color] [color="#8B3E2F"][b]<[/b][/color]no shape[color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]48[/color][color="#8B3E2F"][b]:[/b][/color] [color="#8B3E2F"][b]<[/b][/color]no shape[color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]35[/color][color="#8B3E2F"][b]:[/b][/color] [color="#8B3E2F"][b]<[/b][/color]no shape[color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]38[/color][color="#8B3E2F"][b]:[/b][/color] [color="#8B3E2F"][b]<[/b][/color]no shape[color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]40[/color][color="#8B3E2F"][b]:[/b][/color] [color="#8B3E2F"][b]<[/b][/color]no shape[color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]36[/color][color="#8B3E2F"][b]:[/b][/color] [color="#8B3E2F"][b]<[/b][/color]no shape[color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]37[/color][color="#8B3E2F"][b]:[/b][/color] [color="#8B3E2F"][b]<[/b][/color]no shape[color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b]][/b][/color] [/color] Made with KK's SQF to BBCode Converter Did I do something wrong? My triggers are called t1 - t1_30 (for testing purpose only) I expected, that the array would show the name of each trigger. Share this post Link to post Share on other sites
Schatten 290 Posted February 19, 2015 allMissionObjects returns array of objects. Try to use https://community.bistudio.com/wiki/vehicleVarName. Share this post Link to post Share on other sites
killzone_kid 1332 Posted February 19, 2015 Did I do something wrong? My triggers are called t1 - t1_30 (for testing purpose only) I expected, that the array would show the name of each trigger. It shows debug names assigned to triggers. AFAIK you cannot get the name of the trigger, but you can get the text, which you would need to manually set up in editor. Share this post Link to post Share on other sites
R3vo 2654 Posted February 19, 2015 It shows debug names assigned to triggers. AFAIK you cannot get the name of the trigger, but you can get the text, which you would need to manually set up in editor. Thanks for the clarification. Share this post Link to post Share on other sites
xoo 10 Posted February 19, 2015 (edited) Sure i'm unable to get the trigger's names, so unable to find only my capture triggers. So if we can't have more informations than the below code we have to cheat with the usual use of the trigger's fields systemChat "START..."; _alltriggers = allMissionObjects "EmptyDetector"; systemChat format["total triggers:%1",(count _alltriggers)]; sleep 2; systemChat format["triggers:%1",_alltriggers]; sleep 2; { systemChat format["TRIG: %1 - NAME: %2",_x, (vehicleVarName _x)]; hint str [triggerText _X]; hint str [ _x, triggerText _x, triggerType _x, triggerArea _x, triggerActivation _x, triggerStatements _x, triggerTimeout _x, triggerActivated _x, list _x, triggerAttachedVehicle _x ]; sleep 5; } forEach _alltriggers; systemChat "END !!"; ---------- Post added at 21:23 ---------- Previous post was at 20:32 ---------- So, the only way to deal with triggers placed in editor is t0 replicate the trigger's name in text field... OMG Edited February 20, 2015 by XoO Share this post Link to post Share on other sites
f2k sel 164 Posted February 19, 2015 Why do you need to know the names of the trigger, if you give them names one by one you know the names and can make an array. If it's done dynamically you still store them in an array and just select the one you want. Share this post Link to post Share on other sites
xoo 10 Posted February 20, 2015 Sure, it's already done, but in any programming language you can access every properties of the objects instances you've created... especially their ID/names. Why SQF can't !? Share this post Link to post Share on other sites
f2k sel 164 Posted February 20, 2015 I guess it fell through the cracks or they never expected anyone to need it. Share this post Link to post Share on other sites
xoo 10 Posted February 20, 2015 like associative arrays !! Really never needed by developers... :rolleyes: Share this post Link to post Share on other sites
Larrow 2822 Posted February 20, 2015 (edited) but in any programming language you can access every properties of the objects instances you've created Its not really a programming language, its a scripting API. Why SQF can't !?It could, it just has not been implemented as F2K Sel said.Sure... like associative arrays !! Really never needed by developers We are not developers, we are game modders. The actual developers have access to the what ever they need via the game code they would not necessarily need access via sqf. Put in a request ticket see if you get any response. Edited February 20, 2015 by Larrow Share this post Link to post Share on other sites
dreadedentity 278 Posted February 20, 2015 Why SQF can't !? There are lots of things that should be implemented, but aren't. A big part of this sub-forum is working around that Share this post Link to post Share on other sites