Jump to content
Ambross

Where to place custom scripts in mission folder

Recommended Posts

I've been having a problem with players who show up late to missions not being linked to the zeus and cant use the usual "Editable Objects (Zeus)" option that is available in the Eden Enhanced mod. To fix this I have written the following script that should add all playable units to the list of zeus editable objects every 30 seconds. 

 

while {true} do {

sleep 30;
GameMaster addCuratorEditableObjects [[playableUnits],true ];

};

 

I don't know if the syntax is correct or not but I should be able to figure that out on my own, the problem I am having is that I'm not sure exactly where I should put this in my mission folder. Does it go in the Description.ext, the initServer.sqf or the mission.sqm? Or should I just put something along the lines of " GameMaster addCuratorEditableObjects [[player],true ]; " in the initPlayerLocal.sqf? 

 

I'm pretty new to this scripting stuff so I might be misunderstanding the problem or something but i hope this helps explain what I'm trying to do and if you need any further info just let me know. 

 

Thanks 

Share this post


Link to post
Share on other sites

Someone more knowledgeable might prove me wrong, but I would start with the init.sqf

Share this post


Link to post
Share on other sites

For this initserver is better but you'd  be better off doing it with an event  handler 

Share this post


Link to post
Share on other sites

addMissionEventHandler ["PlayerDisconnected", { params ["_id", "_uid", "_name", "_jip", "_owner", "_idstr"];

GameMaster addCuratorEditableObjects [playableUnits,true ];

}];

 

In your serverinit

Btw playableUnits is already an array  so I removed the []

  • Like 2

Share this post


Link to post
Share on other sites

Alright I tried putting this 

 

addMissionEventHandler ["PlayerDisconnected", { params ["_id", "_uid", "_name", "_jip", "_owner", "_idstr"];

GameMaster addCuratorEditableObjects [playableUnits,true ];

}];

 

in the serverinit and i also put 

 

while {true} do {

sleep 30;
GameMaster addCuratorEditableObjects [playableUnits,true ];

};

 

in the serverinit but neither of these worked. Any other suggestions?

 

 

Share this post


Link to post
Share on other sites

Check that your curator module is indeed named gamemaster. Also I used the wrong eventhandler it should be playerConnected 

Share this post


Link to post
Share on other sites

Ya no I checked that didnt work. the players all have to respawn when they join should i add something to onplayerRespawn.sqf?

 

Share this post


Link to post
Share on other sites

Alright I must have had a problem with syntax when I first tested this but I put this 

 

while {true} do {

sleep 30;
GameMaster addCuratorEditableObjects [playableUnits,true ];

};

 

in the initServer.sqf and it worked. Thanks for the help guys. 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×