Alan 10 Posted June 28, 2011 Hey, for a while I've been wondering how to make a custom scroll menu, lets say if I walk into a trigger, and then I have a scroll menu that can activate another triggers and so on, how can I do that. Share this post Link to post Share on other sites
SmartGun 10 Posted June 28, 2011 Hi, addAction is the command you are looking for. addAction always referes to a scriptfile AFAIK. put in your first trigger something like myAct = player addAction ["nameOfAction", "myScript.sqf"]; in your init.sqf: variableAction1 = false; in myScript.sqf -> goes to your missionfolder _obj = _this select 0; _caller = _this select 1; _id = _this select 2; _obj removeAction _id; variableAction1 = true; the condition of your second Trigger will be variableAction1 this should work in SP, MP will be more complicated Share this post Link to post Share on other sites
Alan 10 Posted June 28, 2011 yea, I just need to make sure it's multiplayer compatible, anyways thanks for the help, I appreciate it. ;) Share this post Link to post Share on other sites
demonized 16 Posted June 28, 2011 For MP, a addAction is local to the client, so that is what you need to be aware of. If you create it only on the client where player == unit1, then unit1 player will be the only one to see it and use it. if you create it on the server, and its a dedicated, noone will see it etc.. Share this post Link to post Share on other sites
Alan 10 Posted June 28, 2011 (edited) Alright, so if I make like 6 units (Playable), I can name them : unit1, unit3, unit4, unit5 and unit6; then I make a trigger for the scroll menu and i set it to unit1, but then, i can just copy and paste it and put one trigger on top of the other one, but renaming the unit1 to unit2.. if you know what I'm saying, then i can just group the units. Edited June 28, 2011 by Alan Share this post Link to post Share on other sites
kylania 546 Posted June 28, 2011 On map triggers will execute for all clients connected. It's great for things like a Day/Night toggle on the map activated from addAction. Have the triggers condition a publicVariable and have the addAction change that variable. That way you can have all clients change based on one guy's action. However for most things it gets more complicated. What exactly are you trying to do with this menu thing? Share this post Link to post Share on other sites
Alan 10 Posted June 28, 2011 (edited) I'm creating a detective mission, and I want, let say if i walk up to someone and scroll down the menu to lets say ask the witness something, it will activate another trigger and there will be a reply. Edited June 28, 2011 by Alan Share this post Link to post Share on other sites
kylania 546 Posted June 28, 2011 this moveInCargo vehicleName; You can also use moveInDriver if you want them to drive the vehicle in question. ---------- Post added at 03:18 PM ---------- Previous post was at 02:38 PM ---------- Ya know, for the talking to the guy you should try using the kbtell system. Here's a good tutorial (part1 and part2) that covers it pretty well. Seems overwhelming at first, but should work pretty well. :) Share this post Link to post Share on other sites