Samcot
Member-
Content Count
20 -
Joined
-
Last visited
-
Medals
Community Reputation
12 GoodAbout Samcot
-
Rank
Private First Class
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
[SOLVED] Need help with activating a trigger when conversation script has finished running.
Samcot replied to Samcot's topic in ARMA 3 - MISSION EDITING & SCRIPTING
It worked! Thank you so much! the simple addition of a = sign made all the difference... Bloody scripting eh. I'm motivated now more than ever to learn as much as I can about this. Thanks again :) -
[SOLVED] Need help with activating a trigger when conversation script has finished running.
Samcot replied to Samcot's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ok, so I did what you asked. On mission start the value of conv1 is 1. Even though I set it to 0 in my init.sqf. See below for the contents of my init.sqf. wp1 = compile preprocessfile "wp1.sqf" ; // Play helicopter path via made with unitCapture. conv1 = 0; // Initialize global variable to false. I also added the following to my trigger on act box. hint "My trigger fired so conv1 must equal 1 now. Yoda be praised."; It wouldn't let me do hintc so I presume this was a typo? The trigger did not seem to fire as I didn't get the hint pop up. I'm not sure why this isn't working lol. Also thanks for telling me about these handy debug tricks. They will sure come in handy. Also thank you for your patience in dealing with this issue for me :) -
[SOLVED] Need help with activating a trigger when conversation script has finished running.
Samcot replied to Samcot's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hmm, still not working. The script seems perfect I don't know why it won't activate the trigger. Perhaps I'm doing something wrong with the trigger. I read somewhere that triggers don't like booleans. So I changed the code in init.sqf to conv1 = 0; // Initialize global variable to false. Then I added conv1 = 1; into my addAction script like you showed me above. (Also changed name to conv1 to keep it shorter). Here is a screenshot of my trigger. And here is the addAction code. inspector = this addAction[ "Talk to the officer", { params[ "_target", "_caller", "_ID" ]; [ "task1", "SUCCEEDED" ] call BIS_fnc_taskSetState; [[ [ "CDF Officer", "Welcome to Altis, Captain. We're glad your here.", _target ], [ "Michael", "Glad to be here. So what's the situation?", _caller ], [ "CDF Officer", "The reds have been hitting our supply lines from the east to try and cripple us.", _target ], [ "CDF Officer", "So far we're holding them off in the south but we're noticing their strength increase by the day.", _target ], [ "Michael", "Just keep doing what you're doing and hold firm Sir. Is my lift ready?", _caller ], [ "CDF Officer", "Your carriage awaits, Captain. Board the helicopter when you're ready.", _target ] ], "CUSTOM", 0.10, true ] execVM "fn_simpleConv.sqf"; _target removeAction _id; conv1 = 1; }]; Also, Here is my create task module. (Create task module is synced to my player. Previously I used "All playable units" for the Owner.) -
[SOLVED] Need help with activating a trigger when conversation script has finished running.
Samcot replied to Samcot's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks for the reply @johnnyboy. Unfortunately it still isn't working 😞 -
[SOLVED] Need help with activating a trigger when conversation script has finished running.
Samcot replied to Samcot's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Dedmen It didn't work. I'm not sure I did it right. I added SAM_FirstConversationDone = true at the end of my script in officer's init box. (See bottom of picture) inspector = this addAction[ "Talk to the officer", { params[ "_target", "_caller", "_ID" ]; [ "task1", "SUCCEEDED" ] call BIS_fnc_taskSetState; [[ [ "CDF Officer", "Welcome to Altis, Captain. We're glad your here.", _target ], [ "Michael", "Glad to be here. So what's the situation?", _caller ], [ "CDF Officer", "The reds have been hitting our supply lines from the east to try and cripple us.", _target ], [ "CDF Officer", "So far we're holding them off in the south but we're noticing their strength increase by the day.", _target ], [ "Michael", "Just keep doing what you're doing and hold firm Sir. Is my lift ready?", _caller ], [ "CDF Officer", "Your carriage awaits, Captain. Board the helicopter when you're ready.", _target ] ], "CUSTOM", 0.10, true ] execVM "fn_simpleConv.sqf"; _target removeAction _id; }]; SAM_FirstConversationDone = true; I then added this to my trigger condition. !isNil "SAM_FirstConversationDone" But it didn't do anything. I'm sorry if I've done this completely wrong. I have no idea how to add code to a script because I get confused where it should go in relation to all the [ and { brackets. -
[SOLVED] Need help with activating a trigger when conversation script has finished running.
Samcot replied to Samcot's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Looks great. I'll give this a go. fn_simpleConv.sqf is the name of my conversation script. Thanks for the reply :) -
Hello everyone! Thanks for answering all my questions over the past few days. You have helped me a lot. However, I have another question... I'll start by putting this code which lives inside my Officer unit's init. (Incase anybody needs to see it) inspector = this addAction[ "Talk to the officer", { params[ "_target", "_caller", "_ID" ]; [ "task1", "SUCCEEDED" ] call BIS_fnc_taskSetState; [[ [ "CDF Officer", "Welcome to Altis, Captain. We're glad your here.", _target ], [ "Michael", "Glad to be here. So what's the situation?", _caller ], [ "CDF Officer", "The reds have been hitting our supply lines from the east to try and cripple us.", _target ], [ "CDF Officer", "So far we're holding them off in the south but we're noticing their strength increase by the day.", _target ], [ "Michael", "Just keep doing what you're doing and hold firm Sir. Is my lift ready?", _caller ], [ "CDF Officer", "Your carriage awaits, Captain. Board the helicopter when you're ready.", _target ] ], "CUSTOM", 0.10, true ] execVM "fn_simpleConv.sqf"; _target removeAction _id; }]; The above code lets my player do the following: Speak to the officer > Complete task1 > Then finally run a conversation script. (All working perfectly) I would now like to create a second task (task2) using the BIS "Create Task" module, where my player is told to get into a helicopter. I tried to create a trigger synced to task2 module with the following code in "Condition" scriptDone fn_simpleConv; But this did not work. Does anybody know a simple way for task 2 to run as soon as my conversation script has finished doing its stuff? (Maybe a 3 second delay after?) Thanks in advance!
-
JBOY Scripts Compilation
Samcot replied to johnnyboy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
These look awesome! I can't wait to dig into some and especially play some of your missions. Thanks for the great post. -
[SOLVED] Help with Simple Conversation Script + Addaction
Samcot replied to Samcot's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ahh I see. This makes sense, thank you for the description man! -
[SOLVED] Help with Simple Conversation Script + Addaction
Samcot replied to Samcot's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Larrow Well I don't know how you did it but it worked! Thank you so much. Some of the guys on here said I should learn about params as they make things a lot easier. I'm presuming you have used 3 params (_target, _caller and _ID) to completely simplify everything and make it work, honestly I'm amazed. How do the params know who each person is? I presume _target is the officer who's variable name is "officer1", _caller is my player who is "michael" and I have no clue what _ID means? I'm learning new things every day thanks to this awesome community. :) -
[SOLVED] Help with Simple Conversation Script + Addaction
Samcot replied to Samcot's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks for the info man! I checked the thread already and there's nothing about it. I made a post anyway. Hopefully it's an easy fix as I'd love to make progress on my mission :) -
[SOLVED] Help with Simple Conversation Script + Addaction
Samcot replied to Samcot's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks for the reply @wogz187. Because I'm fairly new to this scripting stuff I'm unsure what paranthesis is. I assume it's just using 1 set of " instead of multiple ones? (Sorry in advance for me being dumb lol) The script you posted above works great but I'm having a weird issue which I think is due to my lack of scripting knowledge and I wondered if you may know what's going wrong? I'll reproduce my steps for you. Added your script to my officer unit's init. Hit play. Spoke to the officer unit using the addAction and it triggered the taskSetState perfectly. It then gave me This error and did not play my simpleConv script. I spoke to the officer again (As I don't know how to remove addAction once activated for the 1st time) Then my simpleConv script worked fine with no error message. I think the error message has something to do with defining the unit so the built-in lip movement script can activate on the right guy?. In my fn_simpleConv.sqf script that @R3vo made he included an example. Located at the bottom of This image. I was unsure where to post my line1,line2 etc so I just put them at the start. See Here (Located at bottom of image). In my lines I defined the unit which will say the message. "Michael and officer1" I hope I haven't super confused you and I've tried to include as much information as possible. Thanks in advance. Edit - This is the script I'm using. -
[SOLVED] Help with Simple Conversation Script + Addaction
Samcot posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey guys. So I need some help with the following. I set up a task for my player to talk to an officer before heading off onto his next task. (I use an addaction command to talk to the officer (See below) which also sets my task state to succeeded. Code below is put into the init of my officer unit. inspector= this addAction ["Talk to the Officer", "[""task1"",""SUCCEEDED""] call BIS_fnc_taskSetState"]; I wanted to add a short conversation between the player and officer which initiates as soon as the above command is used. (Via addAction "Talk to the officer") Here is the script which initiates the conversation. (Thanks to R3vo's Simple Conversation Script) line1 = ["CDF Officer", "Welcome to Altis, Captain. We're glad your here.",officer1]; line2 = ["Michael", "Glad to be here. So what's the situation?",michael]; line3 = ["CDF Officer", "The reds have been hitting our supply lines from the east to try and cripple us.",officer1]; line4 = ["CDF Officer", "So far we're holding them off in the south but we're noticing their strength increase by the day.",officer1]; line5 = ["Michael", "Just keep doing what you're doing and hold firm Sir. Is my lift ready?",michael]; line6 = ["CDF Officer", "Your carriage awaits, Captain. Board the helicopter when you're ready.",officer1]; [[line1,line2,line3,line4,line5,line6],"CUSTOM",0.15,true] execVM "fn_simpleConv.sqf"; So the above script works perfectly when ran locally from the debug console. How do I combine both scripts together so when I "Talk to the Officer" the conversation script is also played? Thanks in advance. -
[SOLVED] Help to make addAction complete a task.
Samcot replied to Samcot's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks for offering to help out man! I might just do that later on today. :) -
[SOLVED] Help to make addAction complete a task.
Samcot replied to Samcot's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks so much wogz! I need to learn about params as I have no clue what they do. :)