Quack O'Neill 11 Posted March 20, 2022 Im trying to make it so that when the player uses an addAction that a trigger goes off init opfor unit op1 this addAction ['Show Papers','op1 Say2D "paperRustle"','player addRating +10']; Trigger Condition paperRustle; so every time this sound is played the trigger goes off then that same trigger do all the gave papers passed task states Share this post Link to post Share on other sites
Harzach 2517 Posted March 20, 2022 Your addAction executes code, why not set a boolean? Or better, skip the trigger and set your task states directly? Share this post Link to post Share on other sites
Quack O'Neill 11 Posted March 20, 2022 thanks for the reply harzach but im struggling with it. so i have an PapersPassed.sqf now with this inside it op1 Say2D "paperRustle"; player addRating +10; hint "papers passed"; unit init this addAction ['Show Papers','PapersPassed.sqf','deleteVehicle papers1']; trigger condition !alive papers1 How do i say to my PapersPassed.sqf theres an object in world called papers1 delete that... cause that will work like when a leaflet is deleted. its not working now, i guess because the deleteVehicle papers1 is in another objects init how do i point that at the leaflet thats under the curb ? iv tried a few other ways for a while now but i cant figure it out even though i feel like i have the answer in the mission somewhere somehow. i cant see what it is that im missing because all of this works in someway in the mission already. Share this post Link to post Share on other sites
Harzach 2517 Posted March 20, 2022 Your syntax is incorrect. this addAction [ "Show Papers", { params ["_target", "_caller", "_actionId", "_arguments"]; _caller execVM "PapersPassed.sqf"; } ]; PapersPassed.sqf: params ["_caller"]; op1 Say2D "paperRustle"; _caller addRating +10; hint "papers passed"; deleteVehicle papers1; Share this post Link to post Share on other sites
Quack O'Neill 11 Posted March 20, 2022 its not giving me any errors but its not deleting papers1 either do i need to put something in papers1 init ? Share this post Link to post Share on other sites
Harzach 2517 Posted March 20, 2022 Works fine here, something is wrong on your end. Make sure the object "papers1" has actually been given the variable name "papers1." Share this post Link to post Share on other sites
Quack O'Neill 11 Posted March 20, 2022 these are screens of the leaflet and the trigger settings Share this post Link to post Share on other sites
Harzach 2517 Posted March 20, 2022 Share your mission file. Share this post Link to post Share on other sites
Quack O'Neill 11 Posted March 20, 2022 i restarted arma and iv noticed that the script must be being triggered on start because the hint pops up and the leaflet is being deleted because i moved it ontop of the road so i can see it and its not there. so the problem is all that stuff in the script is happening without using the addaction. Share this post Link to post Share on other sites
Harzach 2517 Posted March 20, 2022 That makes no sense. See my previous post. Share this post Link to post Share on other sites
Quack O'Neill 11 Posted March 20, 2022 https://drive.google.com/file/d/11IK-Nz7SGFX_W0SbvBsw4VEVUqcaLMXw/view?usp=sharing Share this post Link to post Share on other sites
Quack O'Neill 11 Posted March 20, 2022 thats just a mission file theres no folder with the PapersPassed.sqf this is the folder with the script in.https://drive.google.com/drive/folders/1G3ulLkfBXLob0mu30DJ5s0ZPMSbq6scM?usp=sharing Share this post Link to post Share on other sites
Harzach 2517 Posted March 20, 2022 The whole file, not just the .sqm. Share this post Link to post Share on other sites
Quack O'Neill 11 Posted March 20, 2022 yea sorry i edited my last post it has the folder with both files in Share this post Link to post Share on other sites
Harzach 2517 Posted March 20, 2022 That's not your whole mission file, but whatever. What you sent works fine for me. Share this post Link to post Share on other sites
Quack O'Neill 11 Posted March 20, 2022 you mean because i forgot to put the init.sqf in the folder ? or its not the whole project file that this part is from ? the mission folder is full of music files and voices files and images that havnt been optimised and lots of it is questionable / personal lol so the papers1 leaflet dosnt delete its self at the start for you? it only disappears when you use the addAction ? Share this post Link to post Share on other sites
Quack O'Neill 11 Posted March 20, 2022 lol i just sat there for ages cleaning out old images and stuff hahah then i decided to try and remove this deleteVehicle papers1; from the script.sqf and add it to the addaction on the unit and it works lol 🙂 I dont get why it wont work that way tho. Thanks for all your help today Harzach. Really appreciate it. Share this post Link to post Share on other sites