Jump to content

Raider_18

Member
  • Content Count

    9
  • Joined

  • Last visited

  • Medals

Community Reputation

3 Neutral

About Raider_18

  • Rank
    Private

Profile Information

  • Interests
    Arma 3 mission design
  1. @SoldierXXX - Many Thanks!! I knew it was something simple, and thank you for throwing in the debug stuff thats really useful. 👍🏻
  2. This is going to be a stupid easy question to answer, I know this is a very simple thing to do, but, I cannot figure this out. I have a trigger placed in editor, it is a 'restricted area'. When the player enters it runs my restricted area function. It will eventually be awesome, but first I need to pass parameters from the trigger to the script to define some things, because there will be multiple areas with different owners and be different sizes etc. So, my question is, how in the heck do I return triggerArea inside of the script from the trigger that exec'd it?? On Act: [independent, false] execvm "restricted.sqf"; restricted.sqf /* bunch of debug stuff here dont worry */ // variables _faction = _this select 0; _sendQRF = _this select 1; _zone = _this; _guards = units inAreaArray _zone select {side _x == _faction}; _bodies = allDead inAreaArray _zone; /* more awesome stuff later after I figure out triggerArea */ You see _zone needs to be the triggerArea, and the _guards are the AI inside the triggerArea (of the corresponding side). Once I figure out how to define these variables all my other code will work and I can place down a bunch of restriced areas and just pass the owner params. But I cant get a return of guards or deadBodies in the dang triggerArea. This is as close as I know how to tell the script that _zone should be the triggerArea of the editor placed trigger whatever size it may be. I have also tried the following: *_zone = _thisTrigger *_zone = _thisList *[independent, thisTrigger, false] execvm "restricted.sqf"; with _zone = _this select 1; None of the above works, keep getting syntax errors about arrays and elements provided. And yes, I have read the wiki and searched the interent for a similar script/solution. Please dont reply with the wiki pages and just tell me to 'read the wiki'. If I understood how to write C code or interpret the generous documentation that is published by Bohemia I wouldnt be posting in the forums for help. I have read and tried to the best of my scripting knowledge from the following: https://community.bistudio.com/wiki/triggerArea https://community.bistudio.com/wiki/inArea https://community.bistudio.com/wiki/inAreaArray https://community.bistudio.com/wiki/Magic_Variables Thank you to anyone who can help 👍
  3. Im learning so much about FSMs, so useful! I got conversations working but how would you make the pushback comments happen one at a time in order? For example: This is how the first menu entry is created: _nul = BIS_convMenu pushBack ["Say Hello.", _topic, "intro_greeting", []]; And this needs to be a secondary response added later: _nul = BIS_convMenu pushBack ["Yes, sorry", _topic, "exit_apologize", []]; I have it inside of an IF THEN like the example you provided: if (_this kbWasSaid [_from, _topic, "first_response", 999999]) then { _nul = BIS_convMenu pushBack ["Yes, sorry", _topic, "exit_apologize", []]; }; However both options are shown in the menu from the start regardless, and the response should come after a sentence from the NPC, like a natural conversation. I have tried the BI Switch-Case-Do format as well but does not seem to work when I arrange it like such: switch (_sentenceId) do { case "first_response": { BIS_convMenu pushBack ["Yes, sorry", _topic, "exit_apologize", []]; }; }; Any reason you see why the option is not waiting for the correct response before showing up in BIS_convMenu?? Thanks alot I have learned a ton so far!
  4. Do you use the Arma tools FSM editor or is there another preference for FSM editing??
  5. You absolute madman! THANK YOU!!! Your way looks super clean and is exactly what I needed, I am about to deep dive the example and start learning, but it looks way easier than I thought so far. And as always you went above and beyond with an example mission. You da man! **Will update this thread after I get something hashed out from scratch after reverse engineering it**
  6. Dang, sorry! I use those commands exactly how you have them written above for all my scripted triggers and they work for me, hard to know what's wrong without knowing what error or what the scenario looks like. If you wanted to end the mission fromt that trigger you could also put that in the onAct statement field like such: trgName setTriggerStatements ["this", "['task5','FAILED'] call BIS_fnc_taskSetState; 'yourEnding' call BIS_fnc_endMission;", ""]; after the condition block "This", the second "" block is the onAct portion of the trigger. so here you can see it is your failed task and the end mission fnc that you have probably already defined. Works for me at least! I think the BIS_fnc's are always best because your calling or spawning them from the game config so its fast and will work every single time.
  7. Raider_18

    In game conversation question

    @Larrow Hey Larrow, long time fan first time poster lol I came across this post while scouring for help with this subject, would you mind taking a glance? Many thanks! @interectic I have also started a little project for the SP crowd, and information delivery to the player is a vital design component in SP. So if you take a look at my post that's hopefully going to be something really cool and easy to use once a script doctor helps me. And some text-to-speech software for voice acting. But personally I think the Apex subtitles (BIS_fnc_EXP_camp_playSubtitles) are the best if your going to be using them, as well as the hold actions. They also give you more editing options
  8. Hey kiba, It looks like your already using 2D pos, Cfg stuff in description, and spawning groups successfully so I would suggest you script the trigger as well if that seems scenario appropriate: private _position = [2D position where you need the trigger] private _someName = createTrigger ["EmptyDetector", _position]; _someName setTriggerArea [50, 50, 50, false]; _someName setTriggerType "NONE"; _someName setTriggerActivation ["EAST", "PRESENT", false]; _someName setTriggerStatements ["this", "['task5','FAILED'] call BIS_fnc_taskSetState;", ""]; That should work Correction: if you needed it 20x30x10 _someName setTriggerArea [20, 30, 10, false];
  9. What's up Arma community! Throwing this out there because I am terrible at this and stuck with getting a conversation scripted. Below all the posted scripts I describe how I am currently experimenting with it What I am trying to do is get an interactive conversation flow between the player and an NPC with the scroll menu and different response options, like in Arma 2. BI has a pretty decent conversations page for this exact subject, with lip synch and all, I have copied it and made only minor tweaks to make it more readable for myself, and for my sound files to play. The example mission is here if someone who knows this stuff wants to take a look or if someone wants a good starting point for conversations in their scenario ----> Google drive example mission What works - I have kbTell working fine, so I know the code and folder set ups are ok, and my sound files play just fine. What is the problem? - when using kbAddTopic nothing! No errors!, no RPT log suspects, no stuttering... but also no functionality 😔. It must be something I am doing wrong but I cannot for the life of me debug it or figure out why. So here we are. It would be super cool to have AI conversations with player choices, especially for the SP crowd My directory - kb --------------- folder with bikb and sqf sounds ----------- folder with a few test samples in .ogg that are confirmed 100% to work in game description.ext mission.sqm Scripts - Description.ext class CfgSentences { class event1 { class talk { file = "kb\talk.bikb"; #include "kb\talk.bikb" // avoids a double declaration }; }; }; kb\talk.bikb class Sentences { class sentence1 { text = ""; textPlain = "Shuuuush"; speech[] = { "\sounds\officer_intro_1.ogg" }; class Arguments {}; actor = "officer" }; class sentence2 { text = ""; textPlain = "Go Away"; speech[] = { "\sounds\officer_intro_2.ogg" }; class Arguments {}; actor = "officer" }; // these sentences are EH options for later class response{ text = "response"; speech[] = { "\sounds\squelch.ogg" }; class Arguments {}; actor = nomad; }; class option1 { text = "op1"; speech[] = { "\sounds\squelch.ogg" }; class Arguments {}; actor = nomad; }; class option2 { text = "op2"; speech[] = { "\sounds\squelch.ogg" }; class Arguments {}; actor = nomad; }; class option3 { text = "op3"; speech[] = { "\sounds\squelch.ogg" }; class Arguments {}; actor = nomad; }; // the Interrupted sentence triggered when the conversation menu is closed without answering (e.g using backspace) class Interrupted { text = "SideChat text"; speech[] = { "\sounds\officer_intro_3" }; class Arguments {}; actor = "officer"; }; }; // Needed parameters. class Arguments {}; class Special {}; startWithVocal[] = { hour }; startWithConsonant[] = { europe, university }; kb\talk.sqf I am also not entirely sure how this one works, I am somewhat scripting literate (after so many hours trial and error) but I don't know if I should replace all the private _variables with the planned interlocuters or...??? that cant be right can it?, idk!? 😟 /* -------BI notes I kept-------- here we will be storing all the sentences from which the player will choose (left side menu) if there is only one option in the array, the sentence will replace the "Talk to" action name we want the player to be able to approach his buddy and talk to him via the action menu. we need to check: if the player is pointing at his buddy if the player is not answering any of his buddy's sentences if the player has not told him hello already then we add that array to _convMenu - the parameters are mostly self-explanatory: ------BI Params--------------- (do these have to be replaced?) _this: Object - the player receiving the sentence. Must have had this particular script assigned via kbAddTopic Player, AI player talking with or both?? _from: Object - the unit that told the sentence _sentenceId: String - the sentence the player is reacting to. Defined in .bikb in class Sentences _topic: String - topic name used in kbAddTopic */ private _convMenu = []; if (_from == officer && _sentenceId == "" && !(_this kbWasSaid [_from, _topic, "sentence1", 999999])) then { _convMenu pushBack ["menu text", _topic, "sentence1", []]; }; // here we make the unit say the proper sentence based on the one he just received // switch-case-do is used here but it is only one solution to manage sentences (if-then etc could do) switch (_sentenceId) do { case "sentence1": { _this kbTell [_from, _topic, "a player response?"]; }; case "sentence2": { _this kbTell [_from, _topic, "????"]; }; case "responses": { // the player will have 3 answers to choose from: _convMenu pushBack ["op1", _topic, "option1", []]; _convMenu pushBack ["op2", _topic, "option2", []]; _convMenu pushBack ["op3", _topic, "option3", []]; }; }; // return the sentence list pool _convMenu; the above is kind of hard for me to make sense of honestly with all the scopes and the switch-case-do wizardry. I have the player named nomad and a BLUFOR AI named officer. I have two triggers one for kbTell and one for BIS_fnc_kbAddTopic When I trigger kbTell all is good, would be great if you only needed to fire off some sentences and be done. ["the topic", "Cfg of topic"] spawn BIS_fnc_kbTell - no issues all is good But with kbAddTopic no such luck here using the following on player only, officer only, both, as objects or as strings, and for any of the methods below: X kbAddTopic ["myTest", "kb\talk.bikb", "kb\talk.sqf"]; X kbAddTopic ["myTest", "kb\talk.bikb"]; X kbAddTopic ["myTest", "kb\talk.bikb", "compile preprocessFileLineNumbers "kb\talk.sqf"]; what I mean by X --> (player, nomad, officer, with and without"") from trigger, from unit init, from a script. Nothing Again no errors or anything to start chipping away at like usual. Here are the resources I have already tried and poured many hours over: Conversations official Biki, 99% of what I have is from the source already, read many times over kbAddTopic Jezuro's old posting HateDead's old posting IndeedPete's pretty cool conversation system that I may just have to adopt if I cant figure this out. Also where I got the sample sound files. Youtube, but kind of like the BI fourm threads a lot of the stuff is outdated Google of course Prayer and hope Anything you guys have would be MUCH appreciated. Thank you so much!
×