wesley32 4 Posted October 28, 2017 Hi guys, Just a quick question, haven't been able to find this anywhere. I'm trying to have a serverside script execute an SQF that's located in a mission folder. How would I accomplish this? If I place test.sqf in my mission root and execute execVM"test.sqf" or execVM"\test.sqf" serverside I get a message "test.sqf" not found. Is it possible to point it to the mission folder? Thanks in advance! Share this post Link to post Share on other sites
OptixDev 8 Posted October 28, 2017 remoteExec - https://community.bistudio.com/wiki/remoteExec 1 Share this post Link to post Share on other sites
wesley32 4 Posted October 28, 2017 Thanks for your answer, unfortunately it's not quite what I'm looking for. Is there a way to point to the mission folder using the path? e.g. execVM \*missionfolder*\test.sqf; Share this post Link to post Share on other sites
OptixDev 8 Posted October 28, 2017 I mean, I don't understand how that is not what you are looking for but okay, just use: format["\%1.%2\script.sqf",missionName,worldName]; Just note missionName for clients returns '__cur_mp'. < In an MP Environment... Then again That doesn't help lmao, since you could just write the mission file name out anyway. Not sure if its something to do with filePatching or not but I believe that's to access root server directory, ive never really ever had to do what you're doing and if I have id use remoteExec to then execute it on a given client. Share this post Link to post Share on other sites
OptixDev 8 Posted October 28, 2017 So if the server is executing it why not just put the script serverside ? 1 Share this post Link to post Share on other sites
wesley32 4 Posted October 28, 2017 I have a server script that spawns a camp with a flag (empty). I'm trying to apply a .paa texture that's stored in the mission folder to the flag the server spawns. I'm trying to keep things mod free. So basically Im trying to get something like this to work in the serverside script: campFlag setObjectTextureGlobal [0,"*missionfolder\texture\campflag.paa"; Share this post Link to post Share on other sites
pierremgi 4851 Posted October 28, 2017 1 hour ago, wesley32 said: I have a server script that spawns a camp with a flag (empty). I'm trying to apply a .paa texture that's stored in the mission folder to the flag the server spawns. I'm trying to keep things mod free. So basically Im trying to get something like this to work in the serverside script: campFlag setObjectTextureGlobal [0,"*missionfolder\texture\campflag.paa"; you mean : if (isServer) then {campFlag setObjectTextureGlobal [0,"\texture\campflag.paa"]}; ? Share this post Link to post Share on other sites
HazJ 1289 Posted October 28, 2017 I don't think it matters. If your script is server-side and you use setObjectTextureGlobal command in that script. The texture still needs to be in the mission. The path should be as followed: this setObjectTexture [0, "textures\texture.paa"]; Obvously don't use "this" but you get the idea of the path at least. As pierremgi said. However! If the texture is inside a .pbo then you use "\" but then everyone will need that .pbo file. Share this post Link to post Share on other sites