Hardtak 10 Posted July 13, 2009 I am completely new to mission creation and scripting, and I have come to the conclusion that the best way for me learn is by working on missions other users have created. Note that I will only do this if I have previously received permission from the mission's creator to do so. The mission I have currently chosen to work on is "Operation Wild Geese" by Lightninguk. I have done research over the past several days on how to use the mission editor as well as write scripts. This research has included reading the wiki, as well as guides on .sqf and other how to material I have found at armaholics, ofpec. I understand the theory but I am lost as to how to get started. I have decided to make a list of areas of the mission "Operation Wild Geese" that I feel could be refined or polished then pic a item from the list and work on it until I am satisfied with the result. The first item I have chosen to work on is a trigger that notifies the players of the mission when the first objective has been completed. Problem is I have no idea where to start, I feel very overwhelmed. I would greatly appreciate it if someone would be kind enough to walk me through the process. I feel that if I could see the process done I could better understand how to apply the theory. Here is what I would like to happen. Upon the destruction of 2 Electrical generators all users will be notified by text on the screen that the objective has been completed. I would also like to have some sounds play as well when the trigger is activated. Here is what I believe should be done. 1. Select the triggers menu option in the editor. 2. Double click on the map to create a new trigger 3. Name the trigger. Although I'm not sure which naming convention to use as I'm not sure if this is a script level, local level, or global level script. 4. Activation set to anybody, as I don't care who destroys the generators 5. Select the once option as it is a one time trigger 6. Next I should set the trigger to not present, as only non destroyed units are considered present. 7. In the Conditions box is where I state that generator 1 and generator 2 need to be not present for the trigger to be activated. 8. In the Act. box is where I state what happens when the trigger is activated. 9. In the text box I put what text I want displayed when the trigger is activated 10. Clicking the effects button lets me choose any sounds effects I want played when the trigger is activated as well as any visual effects that occur when the text is shown. Have I missed anything? If someone could please maybe write a guide on how to do this including syntax I would be very grateful. I know it's a lot to ask but I just don't know how else to start. Thanks for all who take the time to read this and I apologize if there is a similar thread already. I did search for a while before starting a new thread. Share this post Link to post Share on other sites
Starlight 10 Posted July 13, 2009 Some stuff to help. Name each generator as ElecGen1 and ElecGen2 then put the folowing into the trigger 7. (Condition box) - this && !alive ElecGen1 && !alive ElecGen2 Only fires when both generators are dead 8. (Act box) - TaskElecGen setTaskState "SUCCEEDED"; nul = [objNull, ObjNull, TaskElecGen, "SUCCEEDED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sq f"; The above assumes you have a briefing document with the tasks defined. Otherwise just use the hint hint "Electrical Generators Destroyed"; in the Act box. Share this post Link to post Share on other sites
Hardtak 10 Posted July 13, 2009 thanks a lot for your help starlight, I hope you or someone else can answer a few more questions for me. 1. What is the purpose of the && 2. Dose the "!" in "!alive" designate that it should look for the opposite of "alive"? 3. in 8. TaskElecGen is the name of the corresponding objective in the mission briefing? And setTaskState will set the objective to "Succeeded"? 4. And to be perfectly honest I'm not sure what this if for: nul = [objNull, ObjNull, TaskElecGen, "SUCCEEDED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sq f"; Other then that it has to do with the mission briefing. Share this post Link to post Share on other sites
kylania 568 Posted July 14, 2009 thanks a lot for your help starlight, I hope you or someone else can answer a few more questions for me.1. What is the purpose of the && && = AND || = OR 2. Dose the "!" in "!alive" designate that it should look for the opposite of "alive"? Correct, ! means "not", so !alive means "not alive". You could also just use not alive 3. in 8. TaskElecGen is the name of the corresponding objective in the mission briefing? And setTaskState will set the objective to "Succeeded"? Yes, it'll turn the checkbox in the Tasks section green for the player. You want the second part of that to more forcefully let the player know they finished it. 4. And to be perfectly honest I'm not sure what this if for: nul = [objNull, ObjNull, TaskElecGen, "SUCCEEDED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf"; It's a lot of mumbojumbo to display this: The only part you need to change is the "TaskElecGen" part, which should be the name of the task they just finished. The rest just used a built in script to make the pretty box. Other then that it has to do with the mission briefing. Answers in blue. :) Share this post Link to post Share on other sites
Hardtak 10 Posted July 14, 2009 Thanks a lot you two for your answers. that cleared up a lot. :-) Share this post Link to post Share on other sites