sneakyamr 2 Posted November 16, 2020 Hello I'm just trying to figure out how i get this command a mod owner gave me to disable a function in his mod. we could always use the debug to execute it globally but I'm trying to find other ways I made the init.sqf and the myscripft.sqf but I'm not to sure what to put in. This is the command that I need to have execute at the start of the mission globally ---- dceTeleport=FALSE; Share this post Link to post Share on other sites
beno_83au 1362 Posted November 16, 2020 The file is init.sqf, not ini.sqf, so make sure you've got that right. As init.sqf executes on each client just add that line and all clients will set the variable to false. Is there supposed to be anything else in myscript.sqf? 2 Share this post Link to post Share on other sites
ZaellixA 383 Posted November 16, 2020 Maybe you should provide more information on the problem. We can't really know exactly what you want with what you have provided. Regarding the code you provided, it is not clear as to where exactly you have placed the dceTeleport = FALSE; but if you have placed it inside the init.sqf (and not ini.sqf) it will make this variable equal to false. If the mod you refer to makes use of it to disable some of its functionality is unknown to me, so I will assume that the mod maker has instructed you to do so, thus it is what you want to achieve. This approach makes the use of myscripft.sqf (should it be myscript.sqf?) obsolete 'cause there's no apparent need for it (unless you call it somehow, but it is still irrelevant to the question). On the other hand, if you have the code you provided inside the myscripft.sqf and assuming that this is what you want to execute, then you could execute your script inside the init.sqf like private _nil = [] execVM "myscripft.sqf"; or with a call [] call compile preprocessFileLineNumbers "myscripft.sqf"; If any of those does not suit your needs please feel free to ask again. Once more, if you provide more information it will be easier to provide a better solution. 1 Share this post Link to post Share on other sites
sneakyamr 2 Posted November 16, 2020 Yeah I missed typed I meant the init.sqf. I got the myscript.sqf idea from YouTube video that was old as anything. I basically want to use that command line " dceTeleport = FALSE; " and have it execute globally. We use the Debug console and it worked but we are trying to find another way to just have it in the mission by default with out using the Debug Console to execute. 2 Share this post Link to post Share on other sites
Smart Games 76 Posted November 16, 2020 Without the scripts, their effects and validity (whether client-side or server-side), we can hardly help you, because the approaches are different. 2 Share this post Link to post Share on other sites
pierremgi 4739 Posted November 16, 2020 I don't know how the Drongo's mod is made but perhaps, you have an initialization order issue. Did you test it in SP or MP, for example (the order is different)? If that fails in init.sqf but it's OK on console, just try the line in initPlayerLocal.sqf (add it on root if necessary) or, in init.sqf: [] spawn {waituntil {time >0}; dceTeleport = FALSE}; 2 Share this post Link to post Share on other sites
sneakyamr 2 Posted November 16, 2020 @pierremgi so put this [] spawn {waituntil {time >0}; dceTeleport = FALSE}; in the mission init.sqf? ? Share this post Link to post Share on other sites
pierremgi 4739 Posted November 17, 2020 yes. The aim is to set this variable lately, like you do it in console. Share this post Link to post Share on other sites
razzored 37 Posted November 17, 2020 Hi there! Being new to scripting you may want to take a look here aswell Towards the bottom, you will also find links to more specific scenarios 🙂 1 Share this post Link to post Share on other sites
sneakyamr 2 Posted November 19, 2020 the owner of the Mod said to try initPlayer.sqf and put a sleep 10; at the start. I did that too but still didnt work i feel like im missing something in the files or writing the lines wrong. Okay @razzored thanks ill take a look there too. Share this post Link to post Share on other sites
Smart Games 76 Posted November 19, 2020 @sneakyamr do you mean: InitPlayerLocal.sqf? Share this post Link to post Share on other sites
sneakyamr 2 Posted November 19, 2020 nope he said initPlayer.sqf I copy and paste exactly what he said to the post. @Smart Games unless that's what he meant. Share this post Link to post Share on other sites
pierremgi 4739 Posted November 19, 2020 https://community.bistudio.com/wiki/Event_Scripts 1 Share this post Link to post Share on other sites