uncookedzebra 13 Posted July 7, 2016 I have looked a bit in the wiki for it but I don't think that it is up just yet, but BI added in an Untie function or something in with the Apex Protocol. It is shown in the 1st ep of Protocol when you find a police officer tied up. It works just like the new revive system where you hold space and you untie the officer. Anyone know how I can use this in my own mission? Share this post Link to post Share on other sites
kylania 568 Posted July 7, 2016 Demo mission BIS_fnc_holdActionAdd and BIS_fnc_holdActionRemove BIS_fnc_holdActionAdd: /* Author: Jiri Wainar Description: Add a hold action. If the hold actions are not initialized yet, initialize the system first. Parameters: 0: OBJECT - object action is attached to 1: STRING - action title text shown in action menu 2: STRING - idle icon shown on screen 3: STRING - progress icon shown on screen 4: STRING - condition for the action to be shown; special variables passed to the script code are _target (unit to which action is attached to) and _this (caller/executing unit) 5: STRING - condition for action to progress; if false is returned action progress is halted; arguments passed into it are: _target, _caller, _id, _arguments 6: CODE - code executed on start; arguments passed into it are [target, caller, ID, arguments] 0: OBJECT - target (_this select 0) - the object which the action is assigned to 1: OBJECT - caller (_this select 1) - the unit that activated the action 3: NUMBER - ID (_this select 2) - ID of the activated action (same as ID returned by addAction) 4: ARRAY - arguments (_this select 3) - arguments given to the script if you are using the extended syntax 7: CODE - code executed on every progress tick; arguments [target, caller, ID, arguments, currentProgress]; max progress is always 24 8: CODE - code executed on completion; arguments [target, caller, ID, arguments] 9: CODE - code executed on interrupted; arguments [target, caller, ID, arguments] 10: ARRAY - arguments passed to the scripts 11: NUMBER - action duration; how much time it takes to complete the action 12: NUMBER - priority; actions are arranged in descending order according to this value 13: BOOL - remove on completion (default: true) 14: BOOL - show in unconscious state (default: false) Example: [_target,_title,_condShow,_condProgress,_codeStart,_codeProgress,_codeCompleted,_codeInterrupted,_arguments,_duration,_priority,_removeCompleted] call bis_fnc_holdActionAdd; Returns: Action ID, can be used for removal or referencing from other functions. */ BIS_fnc_holdActionRemove: /* Author: Jiri Wainar Description: Removes a hold action. If the removed hold actions was the last one, disable the scripted framework. Parameters: X: OBJECT - object action is attached to X: NUMBER - action ID Example: [_target,_actionID] call bis_fnc_holdActionRemove; Returns: Nothing. */ Super thanks to zozo for pointing out where these were hiding, functions_f. :) Here's a silly "practical" example, totally not using much of the features of this: /* init field of a phone: null = this execVM "tickleMe.sqf"; */ params ["_object"]; [ /* 0 object */ _object, /* 1 action title */ "Tickle Satphone", /* 2 idle icon */ "\a3\ui_f_exp_a\Data\RscTitles\RscEGProgress\downloadicon_ca.paa", /* 3 progress icon */ "\a3\ui_f\data\IGUI\Cfg\simpleTasks\types\upload_ca.paa", /* 4 condition to show */ "true", /* 5 condition for action */ "true", /* 6 code executed on start */ {["Satphone", "That tickles!!"] call BIS_fnc_showSubtitle}, /* 7 code executed per tick */ {hint "Don't stop!"}, /* 8 code executed on completion */ {hint format["%1 tickled a phone!\n\n%3", name (_this select 1), _this select 3 select 0]; player setDamage 0.5;}, /* 9 code executed on interruption */ {["Satphone", "You lazy bum!"] call BIS_fnc_showSubtitle}, /* 10 arguments */ ["Winnar is you!"], /* 11 action duration */ 3, /* 12 priority */ 0, /* 13 remove on completion */ true, /* 14 show unconscious */ false ] call bis_fnc_holdActionAdd; 6 1 Share this post Link to post Share on other sites
POLPOX 779 Posted July 7, 2016 I hope there are some function about it, but I found nothing and this thread may break the rule: Do not post campaign spoilers outside of the "Official Mission" forum: You may edit the post... Anyway, the function should inside the "A3_Missions_F_Exp" or something... Share this post Link to post Share on other sites
fn_Quiksilver 1636 Posted July 7, 2016 I hope there are some function about it, but I found nothing and this thread may break the rule: You may edit the post... Anyway, the function should inside the "A3_Missions_F_Exp" or something... the apex functions are encrypted, but its possible its just a custom action for the scenario. addaction ['untie',etc Share this post Link to post Share on other sites
kylania 568 Posted July 7, 2016 the apex functions are encrypted, but its possible its just a custom action for the scenario. addaction ['untie',etc While the PBOs are encrypted the functions are available in Eden's Functions Viewer. That's how I found the BIS_fnc_EXP_camp_SITREP function. The new "super addAction" style interaction isn't viewable there however. 2 Share this post Link to post Share on other sites
lexx 1392 Posted July 7, 2016 Cool find. And now tell me how to do this new centered dialogue stuff. :> Share this post Link to post Share on other sites
kylania 568 Posted July 7, 2016 Cool find. And now tell me how to do this new centered dialogue stuff. :> ["Speaker Name", "Subtitles to display."] call BIS_fnc_showSubtitle; There is also the 'play at a certain time' version which includes the time at which to display: [ ["Speaker", "Spoken 10 seconds after function spawn.", 10], ["Speaker Two", "Spoken 4 seconds later.", 14] ] spawn BIS_fnc_EXP_camp_playSubtitles; There's also the IFF function, the blue symbols for friendly units: [[tom, dick, harry]] call BIS_fnc_EXP_camp_IFF; 5 Share this post Link to post Share on other sites
R3vo 2654 Posted July 7, 2016 The new functions are quite awesome, quite a few new possibilities. For the actions, if they are similar to what we have with revieve, they could be integrated into the engine directly (Just a wild guess, haven't played the campaign) Share this post Link to post Share on other sites
lexx 1392 Posted July 7, 2016 Wait, so I'll basically have to call a sound, then call the subtitle function? What about lip synch stuff. I remember at least one moment where I've seen an NPC with lip movement. kbTell is not used then? Share this post Link to post Share on other sites
kylania 568 Posted July 7, 2016 The action functions were hiding in the normal functions library, see post #2. Share this post Link to post Share on other sites
kylania 568 Posted July 7, 2016 Wait, so I'll basically have to call a sound, then call the subtitle function? What about lip synch stuff. I remember at least one moment where I've seen an NPC with lip movement. kbTell is not used then? The new pretty subtitles aren't linked to objects or configs at all, simply prints out strings. The normal conversation system should still work, this is just a different method of presenting say remote radio chatter or voice overs. Share this post Link to post Share on other sites
lexx 1392 Posted July 7, 2016 Yeah, but I usually use kbTell, which spawns the text in the chat + plays audio on the characters + lip sync. If I would combine this with the subtitle function, the text would be in chat and in the middle of the screen. I think the center screen text is much easier to read and looks more pretty, but I don't really want to remove my kbTell stuff. Share this post Link to post Share on other sites
R3vo 2654 Posted July 7, 2016 Here's a ready example for the holdActionAdd function: fn_addHoldAction.sqf #define TARGET _this #define TITLE "Downloading Data" #define ICON "" #define PROG_ICON "" #define COND_ACTION "true" #define COND_PROGRESS "true" #define CODE_START {hint "Downloading data..."} #define CODE_TICK {} #define CODE_END {hint "Data downloaded!"} #define CODE_INTERUPT {} #define ARGUMENTS [] #define DURATION 5 #define PRIORITY 1 #define REMOVE true #define SHOW_UNCON false [TARGET,TITLE,ICON,PROG_ICON,COND_ACTION,COND_PROGRESS,CODE_START,CODE_TICK,CODE_END,CODE_INTERUPT,ARGUMENTS,DURATION,PRIORITY,REMOVE,SHOW_UNCON] call bis_fnc_holdActionAdd; init line of your object: _action = this execVM "fn_addHoldAction.sqf"; I thought it would be easier to define the parameters in seperated lines for better legibility. 2 Share this post Link to post Share on other sites
kylania 568 Posted July 7, 2016 Here's a ready example for the holdActionAdd function: There is a tragic lack of tickling in your example. 1 Share this post Link to post Share on other sites
AveryTheKitty 2626 Posted July 7, 2016 How does one use the new SITREP function? Share this post Link to post Share on other sites
kylania 568 Posted July 7, 2016 How does one use the new SITREP function? https://forums.bistudio.com/topic/191961-datetimestamp-in-mission/#entry3057482 Share this post Link to post Share on other sites
uncookedzebra 13 Posted July 8, 2016 Awesome guys thank you for the help :) Share this post Link to post Share on other sites
Optio 0 Posted July 8, 2016 Anyone found images of the right size for hold-action icons?Revive icon "a3\ui_f\data\revive\medikit_ca.paa" works, obviously. BTW, pinging Zeus should require holding a key, not just pressing it. It's the reason most servers disable this feature. Share this post Link to post Share on other sites
lexx 1392 Posted July 8, 2016 This is the guy, by the way. He talks in 3d + I hear him over radio, he moves the lips and there is no text in the bottom left corner. Just how? Some ugly hack / workaround? Especially the simple "type in your custom name"-thing from the new subtitles is great. Hate it so much having to hack around to get the correct name to be displayed as speaker. Share this post Link to post Share on other sites
kylania 568 Posted July 8, 2016 Maybe an empty conversation string? class pilotTalk { text = ""; // leave this empty? speech[] = {"\sound\pilotTalk.ogg"}; // next to pilotTalk.lip actor = "Pilot"; variant = ""; variantText = ""; class Arguments {}; }; 1 Share this post Link to post Share on other sites
lexx 1392 Posted July 8, 2016 Hah, yeah. That seems to do the trick. Basically my dialogue now: enableSentences false; ["Hardy", localize "STR_Radio_1"] call BIS_fnc_showSubtitle; player kbTell [DELTA1, "dialog", "radio_1", "SIDE"]; waitUntil { player kbWasSaid [DELTA1, "dialog", "radio_1", 3] }; ["James", localize "STR_Radio_2"] call BIS_fnc_showSubtitle; DELTA1 kbTell [player, "dialog", "radio_2", "SIDE"]; waitUntil { DELTA1 kbWasSaid [player, "dialog", "radio_2", 3] }; ["Mitchell", localize "STR_Radio_3"] call BIS_fnc_showSubtitle; DELTA2 kbTell [player, "dialog", "radio_3", "SIDE"]; enableSentences true; Quite a few lines for the little bit it is doing. There should be a function to combine this all into one thing. /Edit: Works perfect. I've updated my mission with that stuff. Now I'll just have to learn to keep my eyes at the center screen when the radio beep appears. :> 1 Share this post Link to post Share on other sites
uncookedzebra 13 Posted July 11, 2016 So how would you use Bis_fnc_holdActionAdd with BIS_fnc_MP? Share this post Link to post Share on other sites
kylania 568 Posted July 11, 2016 remoteExec is the new version of BIS_fnc_MP. params ["_object"]; // Add action to all players but not the server. [ /* 0 object */ _object, /* 1 action title */ "Tickle Satphone", /* 2 idle icon */ "\a3\ui_f_exp_a\Data\RscTitles\RscEGProgress\downloadicon_ca.paa", /* 3 progress icon */ "\a3\ui_f\data\IGUI\Cfg\simpleTasks\types\upload_ca.paa", /* 4 condition to show */ "true", /* 5 condition for action */ "true", /* 6 code executed on start */ {["Satphone", "That tickles!!"] call BIS_fnc_showSubtitle}, /* 7 code executed per tick */ {hint "Don't stop!"}, /* 8 code executed on completion */ {hint format["%1 tickled a phone!\n\n%3", name (_this select 1), _this select 3 select 0]; player setDamage 0.5;}, /* 9 code executed on interruption */ {["Satphone", "You lazy bum!"] call BIS_fnc_showSubtitle}, /* 10 arguments */ ["Winnar is you!"], /* 11 action duration */ 3, /* 12 priority */ 0, /* 13 remove on completion */ true, /* 14 show unconscious */ false ] remoteExec ["bis_fnc_holdActionAdd", -2]; 3 Share this post Link to post Share on other sites
uncookedzebra 13 Posted July 11, 2016 You are the best :) Share this post Link to post Share on other sites
Potatoman2012 0 Posted July 11, 2016 Not really relevant to this thread but I can't make a new thread for some weird reason. Anyways, I've just played trough the first mission for apex. I do enjoy the enemy ai because they are really aggressive. I even had one come sprinting after me like a mad man or groups of enemies advancing towards me. Anytime I place enemy groups or single units around a point, then they often are very dull. They just stand still and shoot and don't really move to cover or try to advance or pull back. I've tried out different waypoints with different combat behaviors etc. but no luck there. I've also seen other sp missions with "smart" ai. So how do I make the enemy ai interesting? I don't want them just to stand still and shoot like retards. Share this post Link to post Share on other sites