Feature #12423

Add Action Helper Script

Added by BigDawgKS over 4 years ago. Updated over 4 years ago.

Status:Closed Start date:07/28/2010
Priority:Normal Due date:
Assignee:Sickboy % Done:

100%

Category:Misc Functions
Target version:v0.7.0
Component: Affected Version:
Close Reason:

Description

I need to remotely execute some code from an action. The problem is that addAction only takes an specific file (and not code), and obviously if the client does not have that script then they can't execute that code. I need a helper script that I can pass code to, and that as long as the client has it installed, will allow me to remotely execute it upon use of the action.

I wrote this up real quick as an example of how it might work:
_param = _this select 3;

if(typeName _param == "ARRAY")then{
_code = _param select 0;
_args = _param select 1;

[_this select 0,_this select 1,_this select 2,_args] call _code;
}else{
_code = _param;
[_this select 0,_this select 1,_this select 2] call _code;
};

And called with:
_obj addAction ["My Action",CBA_actionHelper,_myOnActCode,1,false,true,"",""];
Or:
_obj addAction ["My Action 2",CBA_actionHelper,[_myOnActCode,_moreArgs],1,false,true,"",""];

Associated revisions

Revision 8ddb4d27
Added by Sickboy over 4 years ago

~ ADDED: CBA_actionHelper. By BigDawgKS. closes #12423

Revision 8ddb4d27
Added by Sickboy over 4 years ago

~ ADDED: CBA_actionHelper. By BigDawgKS. closes #12423

Revision 2a8f4f38
Added by Sickboy over 4 years ago

ADDED: Header. refs #12423

Revision 2a8f4f38
Added by Sickboy over 4 years ago

ADDED: Header. refs #12423

History

Updated by Sickboy over 4 years ago

  • Status changed from New to Assigned
  • Assignee set to Sickboy
  • Target version set to 750
  • % Done changed from 0 to 10

Thanks for the idea, and sorry for the extremely late reply!
I like the idea, adding!

Updated by Sickboy over 4 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 10 to 100

Updated by Sickboy over 4 years ago

  • Status changed from Resolved to Closed

Added! Will be available at next Six Updater update Friday. And in the next stable release of CBA (perhaps the next ACE stable)

Updated by Sickboy over 4 years ago

  • Target version changed from 750 to v0.7.0

Also available in: Atom PDF