Jump to content

Sign in to follow this  
jcae2798

Could really use some experts help on creating an Addon from scripts

Recommended Posts

I've been trying for days now trying to convert a scripted revive script into a personal addon so that i do not have to implement it into my missions every time. Is there anyone willing to work with me? I have gotten the original INIT script to run, but from there it requires a 2nd script which is called with the below code. I can't seem to get it working and i think it might be related to the PATH coding it uses since the scripts it uses and other function scripts are located within other folders. If i can get someone to personally assist i would appreciate. I dont want to necessarily post all the stuff here since these scripts are from another user and I don't want to make it seem like its my work. All i am trying to do is create a addon for myself. I asked if he would create one but he will not because he does not want to interfere with other mission makers revive systems. So i am on my own :)

So from my notes above, here is the 2nd script used in the INIT file (reworded to hide the addons identity.:

["%1 --- Executing ABC SS init.sqf",diag_ticktime] call BIS_fnc_logFormat;

if (!isDedicated) then {

ABC_SS_PATH = "abc_revive\";

{[_x] call compile preprocessFile (ABC_SS_PATH+"init_ais.sqf")} forEach (if (isMultiplayer) then {playableUnits} else {switchableUnits});

Share this post


Link to post
Share on other sites

You didn't quite hide psycho's wounding script :) I understand why you would want it as an addon however.

Share this post


Link to post
Share on other sites
  Kremator said:
You didn't quite hide psycho's wounding script :) I understand why you would want it as an addon however.

Haha I was thinking the same thing. I also understand why psycho did not want to release as addon. He explained on his thread. Honestly if he approves I would use it nearly 100% of the time as I live in the Editor. Although I am also spending days on one mission in editor now and just tinkering with scripts so it its starting to bother me less.

Edited by sttosin

Share this post


Link to post
Share on other sites

Ha, i guess the cats out of the bag :)

I'm been working on it for the past 3 days now and i'm so close. I finally got the 3 main scripts to run but still not working. When it loads i run into script errors from the init_ais script. Having a hard time figuring it out.

BTW, I got word from Psycho's that we can create it for our own use and even distribute it but credits have to be given which of course no doubt credit all goes to him for this. If anyone has any ideas on how to make it work let me know! I can share what i have so far if you all want to see the issues i am running into. Thanks

---------- Post added at 16:07 ---------- Previous post was at 16:02 ----------

Also btw, it might have to do with the description.ext code. I currently have it setup this way which i'm not sure if its correct or not:

class myMissionConfig {

class mySetup {

class RscTitles {

#include "ais_injury\dialogs\rscTitlesAIS.hpp"

};

class CfgFunctions {

#include "ais_injury\cfgFunctionsAIS.hpp"

};

};

};

If i try for example:

#include "myaddonname\ais_injury\cfgFunctionsAIS.hpp"

i get errors file not found (Include file "path" not found.), but if i put

#include "\myaddonname\ais_injury\cfgFunctionsAIS.hpp"

it works just as the above code, so not sure which one is correct but didnt seem to make a difference where i currently stand anyways.

Share this post


Link to post
Share on other sites

If anyone does manage to get it to work it would be nice to include userconfig for applies only to 1. Playable units 2. Player group 3. Player team 4. All units.

Share this post


Link to post
Share on other sites

Thats a good point, my next task once i get this working is to put the settings script file into a config.hpp file if possible.

Share this post


Link to post
Share on other sites

So some good news, I got it running and working, but i am running into script errors. Below is the error i get in game. Seems to still run OK so not sure what this affects but wondering why this script would occur using addon but not when the script runs as part of the mission;

[52817,568.286,0,"XEH: PostInit Started"]

Suspending not allowed in this context

Error in expression <fnc_feedback_hitArrayHandler"} || {time > _timeend}};

["%1 --- adding wounding >

Error position: <> _timeend}};

["%1 --- adding wounding >

Error Generic error in expression

Suspending not allowed in this context

Error in expression <fnc_feedback_hitArrayHandler"} || {time > _timeend}};

["%1 --- adding wounding >

Error position: <> _timeend}};

["%1 --- adding wounding >

Error Generic error in expression

Suspending not allowed in this context

Error in expression <fnc_feedback_hitArrayHandler"} || {time > _timeend}};

["%1 --- adding wounding >

Error position: <> _timeend}};

["%1 --- adding wounding >

Error Generic error in expression

Suspending not allowed in this context

Error in expression <

if (isPlayer _unit) then {

waitUntil {sleep 0.3; !isNull (findDisplay 46)};

(f>

Error position: <sleep 0.3; !isNull (findDisplay 46)};

(f>

Error Generic error in expression

Suspending not allowed in this context

Error in expression <fnc_feedback_hitArrayHandler"} || {time > _timeend}};

["%1 --- adding wounding >

Error position: <> _timeend}};

["%1 --- adding wounding >

Error Generic error in expression

Suspending not allowed in this context

Error in expression <fnc_feedback_hitArrayHandler"} || {time > _timeend}};

["%1 --- adding wounding >

Error position: <> _timeend}};

["%1 --- adding wounding >

Error Generic error in expression

Any i believe this is part of the following code from the script:

_timeend = time + 2;

waitUntil {!isNil {_unit getVariable "BIS_fnc_feedback_hitArrayHandler"} || {time > _timeend}}; // work around to ensure this EH is the last one that was added

["%1 --- adding wounding handleDamage eventhandler first time",diag_ticktime] call BIS_fnc_logFormat;

_unit addEventHandler ["HandleDamage", {_this call tcb_fnc_handleDamage}];

Share this post


Link to post
Share on other sites

Sure, let me do some tweaks before sharing. Should have it ready in the next day or so.

Share this post


Link to post
Share on other sites

Thanks :) If anyone is interested just let me know.

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  

×