Jump to content
Sign in to follow this  
TakanoFukada

Executing a script via useraction in config.cpp

Recommended Posts

Greetings,

I would like to embed an action that executes a SQS script into an add-on... I remembered vaguely that you have to add some lines to the UserAction section.. can someone please kindly provide a sample here? Would be greatly appreciated, thanks so much ! smile_o.gif

Share this post


Link to post
Share on other sites

class UserActions

{

class name

{

displayName="";

position="";

radius=;

condition="";

statement="[this] exec ""script.sqs""";

};

};

Share this post


Link to post
Share on other sites

Wrong forum, but here is one example.... I'm sure there are others in the forum for config files

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class UserActions

{

class View

{

displayName="View Dialog Interface";

position="aa";

radius=3;

                                condition="alive this";

statement=" [this] exec ""\youraddon_name\createdialog.sqs""";

};

The condition line can can take other arguments also

Share this post


Link to post
Share on other sites

position="aa";

radius=3;

er, can someone please tell me how this position / radius thingie works? are they relative to one another?

thanks !

Share this post


Link to post
Share on other sites

Position I believe is a point set up in the Memory LOD within your model. Radius is the radius of a circle around that point where if the player walks into that radius they will be given that action command. biggrin_o.gif

Share this post


Link to post
Share on other sites

hmm.. let's see, i would like the script to be executable by the Commander only in the vehicle add-on that i am making... so how do i go about placing that limitation in?

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  

×