Jump to content
Sign in to follow this  
Nach

addaction && variable by _this select help

Recommended Posts

_mrap = _this select 0;
// computer = object in editor
 
addac = computer addAction ["Boom!",{ _mrap setdammage 1},[],1,false,true,"","(_target distance _this) < 150"];
publicVariable "addac";
 
hello,
It s possible to have a return variable in addaction script "boom!"   _mrap   after select this ?   The debug editor not found this variable .
Thank for your help!
 
Nach

Share this post


Link to post
Share on other sites
//declare computer variable globally somewhere in your program

fn_mrapBoom = {

  params ["_vehicle"];

  addac = computer addAction ["Boom!",{ 
		params[ "_target", "_caller", "_ID", "_args" ];
		_args setdammage 1},_vehicle,1,false,true,"","(_target distance _this) < 150"];

  publicVariable "addac";

};

[ vehicleVariableName ] call fn_mrapBoom;

fixed and works

Edited by stuguy
was wrong

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  

×