D. Patterson 14 Posted July 12, 2014 So I have a post, that when you walk up to it, you get several action menu items. Teleport 1, Teleport 2, Teleport 3. How do I make it so I can have each one link to the same sqf, but the sqf can differentiate between what option was selected. Im fine with putting multiple addactions in the init, but I dont want Teleport1.sqf, teleport 2.sqf, etc. (Because I actually have 15 teleport positions). Share this post Link to post Share on other sites
L3TUC3 32 Posted July 12, 2014 https://community.bistudio.com/wiki/switch_do Share this post Link to post Share on other sites
Larrow 2822 Posted July 12, 2014 As L3TUC3 says using a switch statement in your teleport.sqf will do the job. Just make each addAction pass something in the arguments that you can check against e.g Actions _object addAction ["Teleport 1", "teleport.sqf", 1 ]; _object addAction ["Teleport 2", "teleport.sqf", 2 ]; teleport.sqf _passedArgument = _this select 3; switch (_passedArgument) do { case 1 : { //do whatever }; case 2 : { //etc }; }; Share this post Link to post Share on other sites