Jump to content
Sign in to follow this  
usbstuck

how to pass _forEachIndex as parameter?

Recommended Posts

Hi all,

Can anyone tell me how I can get this to work?

When using radio command "BRAVO" the expected result is a hint with "yada 1 yada".

However, it seems _forEachIndex is not passed properly. What I'm getting is "yada any yada".

When I try to get the typeName, the result is an empty string... eg: hint format ["yada %1 yada", typeName (_this select 0)];

showId = {
hint format ["yada %1 yada", _this select 0];
};

// Triggers
_triggers = [];
{
_tr = createTrigger ["EmptyDetector", position player];
_tr setTriggerActivation [_x, "PRESENT", true];
_tr setTriggerStatements ["this", "[_forEachIndex] spawn showId", ""];
_triggers = _triggers + [_tr];
} forEach ["ALPHA", "BRAVO", "CHARLIE", "DELTA"];

Edited by usbStuck

Share this post


Link to post
Share on other sites

*crunch crunch*... aaah. That actually makes sense. Cheers!

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
Sign in to follow this  

×