kdk11 1 Posted July 2, 2013 I am just wondering if this http://forums.bistudio.com/showthread.php?91875-New-conversation-system-how-to is still the correct way to go about creating conversations between AI and Playable units? Also I would like to know how I would go about putting this system into my mission so that when one task is complete, only then would you be able to speak to the AI for task 2? Share this post Link to post Share on other sites
Johnson11B2P 3 Posted July 2, 2013 Use a if statement _taskResult = taskState taskOne; if(_taskResult == "Succeeded") then { //add your conversation }; If you need me to break this down further let me know. Share this post Link to post Share on other sites
kdk11 1 Posted July 2, 2013 I sure do lol I have no idea what I need to do in editor and in any other files outside of the in game editor. I will appreciate your help a lot thanks! :) Share this post Link to post Share on other sites
Johnson11B2P 3 Posted July 2, 2013 Okay the command taskState (http://community.bistudio.com/wiki/taskState) returns certain values which are Strings. So by assigning the local variable "_taskResult" to equal the taskState of task object "taskOne" we can test if the task was successful or failed or whatever. This way you can have different dialogs depending on each return variable that taskState gives you. So in the if statement we are checking to see if the the state of taskOne is succeeded. If it is then add your conversation you want. Share this post Link to post Share on other sites
kdk11 1 Posted July 2, 2013 Nope am not grasping that mate. sorry. Share this post Link to post Share on other sites
kylania 568 Posted July 2, 2013 You don't need to use the conversation system to make AI talk. Simple sideChat commands will suffice. Or even just titleText. Are you not understanding the code Johnson wrote up there? or something else? Share this post Link to post Share on other sites
kdk11 1 Posted July 2, 2013 Okay the command taskState (http://community.bistudio.com/wiki/taskState) returns certain values which are Strings. So by assigning the local variable "_taskResult" to equal the taskState of task object "taskOne" we can test if the task was successful or failed or whatever. This way you can have different dialogs depending on each return variable that taskState gives you. So in the if statement we are checking to see if the the state of taskOne is succeeded. If it is then add your conversation you want. I dont grasp this lol I just figured out how when going into a trigger side chat pops up. So now I need to try figure how to make these triggers only fire once a task is complete before it. For examply my squad clear a town. once town is clear. then it becomes possible to talk to AI along with the task changing from clear town to talk to civilians. Share this post Link to post Share on other sites
kylania 568 Posted July 2, 2013 (edited) First things first... you have in place a task that you've created and you set it as SUCCEEDED when the town is clear? Lets assume your task ID is tskClearTown. There's the command taskState. This command will return a value of the current state of a task. The syntax for this command is: _currentStateOfTask = taskState tskClearTown; When the town is clear and we set tskClearTown to SUCCEEDED we use the taskState command it'll return SUCCEEDED. In the example above I save that value to a variable I made up called _currentStateOfTask but we don't need to for your trigger. For your trigger we could just use this as the condition: taskState tskClearTown == "SUCCEEDED" That's saying, This trigger is activated when the state of the tskClearTown task is equal to "SUCCEEDED". Or, when the town is clear. Got all that? If not, ask. :) Now, the tricky part is what you mean by "possible to talk to AI" because that'll depend on how you're letting them talk to them currently. Can you explain how you want it to happen? Then we can make the pieces fit to that idea. Edited July 2, 2013 by kylania Share this post Link to post Share on other sites
BullyBoii 10 Posted July 2, 2013 //if you want to be constantly checking if a task has been completed use the code below while {task1 taskState != "Succeeded"} do//creates a loop that will continue until condition is broken { waitUntil {task1 taskState == "Succeeded"};//hold script until the task is completed unit sideChat "Put message here";//message that unit says }; hope that helps Share this post Link to post Share on other sites
kdk11 1 Posted July 2, 2013 (edited) taskState "tskClearTown" == "SUCCEEDED" When I try put that in the trigger I get this "taskstate: Type string, expected Task. for now I would just like a dialogue conversations between the UNIT and the AI... Edited July 2, 2013 by KDK11 Share this post Link to post Share on other sites
kylania 568 Posted July 2, 2013 Oops, forgot it was an object and not the name of the task. Remove the " " around tskClearTown :) Share this post Link to post Share on other sites
kdk11 1 Posted July 2, 2013 would i put this in the same trigger that detects all the opfor are dead? Share this post Link to post Share on other sites
kylania 568 Posted July 2, 2013 No. That trigger would do any number of things. You could skip all of this and just have that trigger do it all. OPFOR NOT PRESENT onAct: [["tskClearTown", "SUCCEEDED"], "BIS_fnc_taskSetState", true, true] spawn BIS_fnc_MP; [[west, "tsktalkToAI", ["You can talk to your contact about the next part of the mission now!", "Get More Info", "Contact"], aiContactUnit, true], "BIS_fnc_taskCreate", true, true] spawn BIS_fnc_MP; That will wait till the town is clear, succeed the clear town task and make a new task to talk to an AI named aiContactUnit. Share this post Link to post Share on other sites
kdk11 1 Posted July 2, 2013 [["clr1", "SUCCEEDED"], "BIS_fnc_taskSetState", true, true] spawn BIS_fnc_MP; error type script expect nothing comes up with the pointer moved inbetween these two [[west, "tsktalkToAI", ["You can talk to your contact about the next part of the mission now!", "Get More Info", "Contact"], c1, true], "BIS_fnc_taskCreate", true, true] spawn BIS_fnc_MP; Share this post Link to post Share on other sites
kylania 568 Posted July 2, 2013 Bleh, put the 0 = in front of those two lines :) Share this post Link to post Share on other sites
kylania 568 Posted July 2, 2013 You might have a typo somewhere else? Worked inside a trigger for me with the 0 = Share this post Link to post Share on other sites
kdk11 1 Posted July 2, 2013 [["clr1", "SUCCEEDED"], "BIS_fnc_taskSetState", true, true] spawn BIS_fnc_MP; 0 = [[west, "tsktalkToAI", ["You can talk to your contact about the next part of the mission now!", "Get More Info", "Contact"], aiContactUnit, true], "BIS_fnc_taskCreate", true, true] spawn BIS_fnc_MP; Like so? I have placed a few triggers around so that they trigger conversations once you come into distance. However I have like 6/7 triggers for one conversation. Is there a way to put them all into one trigger? I have been using this... Ghost1 sideChat "Ok men SITREP...."; msg7 = "done" in the on act and the condition msg6 == "done" It works but I know its from Arma 2 and am sure there is a easier/better way to do it then that. As in my mission you have to speak to a few civs to find the one who will give the info up Share this post Link to post Share on other sites
Johnson11B2P 3 Posted July 2, 2013 When you put characters in double quotes it makes it a string object. So just take off the double quotes. Share this post Link to post Share on other sites
kylania 568 Posted July 2, 2013 (edited) Instead of all those triggers and variables just use something like a script or even a GameLogic and waypoints. That way you can time the messages and whatever you want. You can even have the waypoints wait for a trigger or value to be set to continue. Edited July 2, 2013 by kylania Share this post Link to post Share on other sites
kdk11 1 Posted July 3, 2013 Yeah I have it all setup now. Just trying to figure out how to make them come active after the task "assigned" comes up for searching for intel. then and then only can you speak to them. Share this post Link to post Share on other sites
kylania 568 Posted July 3, 2013 What exactly is "them" and how exactly are you "talking to them"? :) Share this post Link to post Share on other sites
kdk11 1 Posted July 3, 2013 I just placed triggers around each of the civis that become active when blufor walk near them. Using the arma 2 way I said earlier :) Share this post Link to post Share on other sites
kdk11 1 Posted July 3, 2013 is that sarcastic? lol ---------- Post added at 02:26 ---------- Previous post was at 02:22 ---------- Should I inbox you with a link to my mission and you will be to see? As I am rubbish at trying to describe these things Share this post Link to post Share on other sites